From fd633aa6acb2ad215ab0c4c8b2c3496f68d12561 Mon Sep 17 00:00:00 2001
From: Martin Leblanc <m26lebla@uwaterloo.ca>
Date: Thu, 11 Nov 2021 18:17:38 +0000
Subject: [PATCH] ISTWCMS-5163: css for ckeditor stretching image challenge

---
 .../02-base/02-html-elements/26-media/_img.scss | 17 ++++++++++++++++-
 .../04-components/copy-text/_copy-text.scss     |  3 ++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/source/_patterns/02-base/02-html-elements/26-media/_img.scss b/source/_patterns/02-base/02-html-elements/26-media/_img.scss
index 8143c4e0..bcc13541 100644
--- a/source/_patterns/02-base/02-html-elements/26-media/_img.scss
+++ b/source/_patterns/02-base/02-html-elements/26-media/_img.scss
@@ -5,10 +5,25 @@ img {
   border: 0;
   font-style: italic; // Makes alt text stand out from surrounding text.
   max-width: 100%;
-  vertical-align: middle;
 
   @media print {
     max-width: 100% !important;
     page-break-inside: avoid;
   }
 }
+.media--type-uw-mt-image{
+  img{
+    height: auto;
+    object-fit: scale-down;
+  }
+}
+.media--type-uw-mt-image[data-width],
+.media--type-uw-mt-image[data-height]{
+  background:$test-color-1;
+  img{
+    height: inherit;
+    max-width:inherit;
+    object-fit: inherit;
+    width: inherit;
+  }
+}
diff --git a/source/_patterns/04-components/copy-text/_copy-text.scss b/source/_patterns/04-components/copy-text/_copy-text.scss
index 00ed19c0..b6ce0159 100644
--- a/source/_patterns/04-components/copy-text/_copy-text.scss
+++ b/source/_patterns/04-components/copy-text/_copy-text.scss
@@ -8,7 +8,8 @@
       padding-right: 1rem;
     }
     &.align-center {
-      padding: 1rem 0;
+      padding-left:0;
+      padding-right:0;
       text-align: center;
       img{
         display: block;
-- 
GitLab