From 9439a5bd3cf2b4c4c25e94c18c22b101e485d0e0 Mon Sep 17 00:00:00 2001 From: Sehwan Date: Thu, 1 Aug 2024 13:08:33 -0300 Subject: [PATCH 1/2] Fixed incorrect aspect ratio issue with object-fit --- components/image.js | 1 + components/step.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/image.js b/components/image.js index 1d6c0aa..c1b1a34 100644 --- a/components/image.js +++ b/components/image.js @@ -27,6 +27,7 @@ class Image extends HTMLElement { return css` img { display: block; + object-fit: contain; box-shadow: 2px 2px 4px 0 var(--bg-300); } `; diff --git a/components/step.js b/components/step.js index a68eff0..daf85d6 100644 --- a/components/step.js +++ b/components/step.js @@ -103,11 +103,13 @@ class Step extends BaseStepElement { width: auto; height: 40px; margin: 20px 0; + object-fit: contain; @media only screen and (min-width: 768px) { width: 60px; height: 60px; margin: 50px 0; + object-fit: contain; } } .step-content { From b8d1cabc3b6ed06a9f0974742241a8fbc99a803a Mon Sep 17 00:00:00 2001 From: Sehwan Date: Thu, 1 Aug 2024 16:22:01 -0300 Subject: [PATCH 2/2] Removed unnecessary object-fit --- components/step.js | 1 - 1 file changed, 1 deletion(-) diff --git a/components/step.js b/components/step.js index daf85d6..df2e526 100644 --- a/components/step.js +++ b/components/step.js @@ -109,7 +109,6 @@ class Step extends BaseStepElement { width: 60px; height: 60px; margin: 50px 0; - object-fit: contain; } } .step-content {