Allow RTL-able images to display in Storybook

This commit is contained in:
trevor-signal 2023-11-07 18:46:15 -05:00 committed by GitHub
parent ca2b3bacce
commit 8d56ba4b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,23 +269,7 @@ $rtl-icon-map: (
}
@mixin color-svg($svg, $color, $stretch: true, $mask-origin: null) {
$rtl-svg: get-rtl-svg($svg);
@if $rtl-svg {
:dir(ltr) & {
-webkit-mask: url($svg) no-repeat center;
@if $stretch {
-webkit-mask-size: 100%;
}
}
:dir(rtl) & {
-webkit-mask: url($rtl-svg) no-repeat center;
@if $stretch {
-webkit-mask-size: 100%;
}
}
} @else {
-webkit-mask: url($svg) no-repeat center;
}
-webkit-mask: url($svg) no-repeat center;
@if $stretch {
-webkit-mask-size: 100%;
}
@ -296,6 +280,12 @@ $rtl-icon-map: (
@media (forced-colors: active) {
background-color: WindowText;
}
$rtl-svg: get-rtl-svg($svg);
@if $rtl-svg {
:dir(rtl) & {
-webkit-mask: url($rtl-svg) no-repeat center;
}
}
}
// Keyboard