From 3726ed9b8438fb4f9655fdcc5abd69243e7b4ef6 Mon Sep 17 00:00:00 2001
From: Kevin Paxman <kpaxman@uwaterloo.ca>
Date: Thu, 13 Apr 2023 16:39:20 -0400
Subject: [PATCH] ISTWMCS-6283: make image proportion fix apply to all images,
 not just sized ones.

---
 src/patterns/01-core/elements/_img.scss      | 2 ++
 src/patterns/04-components/image/_image.scss | 4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/patterns/01-core/elements/_img.scss b/src/patterns/01-core/elements/_img.scss
index 5d2850ce..77677055 100644
--- a/src/patterns/01-core/elements/_img.scss
+++ b/src/patterns/01-core/elements/_img.scss
@@ -3,6 +3,8 @@
 
 :where(img) {
   max-inline-size: 100%;
+  /* Ensure images maintain proportions despite having dimensions set. */
+  height: auto;
   @media print {
     max-width: 100% !important;
     page-break-inside: avoid;
diff --git a/src/patterns/04-components/image/_image.scss b/src/patterns/04-components/image/_image.scss
index 9e26318a..0b8e414e 100644
--- a/src/patterns/04-components/image/_image.scss
+++ b/src/patterns/04-components/image/_image.scss
@@ -16,10 +16,6 @@
       display: table-caption;
     }
     &__sized-image {
-      /* Ensure sized images maintain proportions despite having dimensions set. */
-      img {
-        height: auto;
-      }
       &--center {
         align-self: center;
         img {
-- 
GitLab