Skip to content

Commit

Permalink
fix (image mask): add explicit inherit for mask-size for strectching …
Browse files Browse the repository at this point in the history
…to work with firefox (#3187)
  • Loading branch information
Arukuen authored Jun 24, 2024
1 parent 825c04b commit 3077a79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/block-components/image/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/block-components/image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 3077a79

Please sign in to comment.