From 859b1ce04f89ad2cbefc8b8829e2e58bdd4cb375 Mon Sep 17 00:00:00 2001 From: Alquen Antonio Sarmiento Date: Sun, 19 May 2024 21:29:34 +0800 Subject: [PATCH] fix: add explicit inherit for mask-size for strectching to work with firefox --- 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; + } } }