From 3077a796f7bfe7988c8ff121c2cfe26b6fcea414 Mon Sep 17 00:00:00 2001 From: Alquen Antonio Sarmiento Date: Mon, 24 Jun 2024 15:29:15 +0800 Subject: [PATCH] fix (image mask): add explicit inherit for mask-size for strectching to work with firefox (#3187) --- src/block-components/image/editor.scss | 4 ++++ src/block-components/image/style.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/block-components/image/editor.scss b/src/block-components/image/editor.scss index 32c4acfca..36388ad96 100644 --- a/src/block-components/image/editor.scss +++ b/src/block-components/image/editor.scss @@ -245,6 +245,10 @@ // Firefox doesn't stretch SVG masks via attributes, stretching is done here. Fixes #246. &.stk-image--shape-stretch .stk-img-resizer-wrapper { mask-size: 100% 100%; + // Firefox doesn't automatically inherit the mask-size from the parent. Fixes #3042. + img { + mask-size: inherit !important; + } } } diff --git a/src/block-components/image/style.scss b/src/block-components/image/style.scss index f2038ced8..9499c4093 100644 --- a/src/block-components/image/style.scss +++ b/src/block-components/image/style.scss @@ -56,6 +56,10 @@ &::before { mask-size: 100% 100%; } + // Firefox doesn't automatically inherit the mask-size from the parent. Fixes #3042. + img { + mask-size: inherit !important; + } } }