From 05c772f38946b517459e3e107f0cd3ac20eba23e Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 19 Feb 2021 13:35:16 +0000 Subject: [PATCH] fix: responsive Figure aspect ratio in Safari See https://discord.com/channels/722225264733716590/742863504515793149/812308038174244904 See https://stackoverflow.com/a/61196907 --- wowchemy/assets/scss/wowchemy/_base.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wowchemy/assets/scss/wowchemy/_base.scss b/wowchemy/assets/scss/wowchemy/_base.scss index b218fa50..09f418ce 100644 --- a/wowchemy/assets/scss/wowchemy/_base.scss +++ b/wowchemy/assets/scss/wowchemy/_base.scss @@ -245,6 +245,9 @@ figure img { height: auto; max-width: 100%; flex-basis: 100%; + // Safari fix for responsive aspect ratio issue when `height: auto` set with flex parent. + // See https://stackoverflow.com/a/61196907 + align-self: flex-start; } // Center all figure captions by default.