Skip to content

Commit

Permalink
Merge pull request #4560 from consul/improve_icon_support
Browse files Browse the repository at this point in the history
Fix SVG icons on old browsers
  • Loading branch information
javierm committed Jun 23, 2021
2 parents 918276e + d0f8560 commit cdc31db
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions app/assets/stylesheets/mixins/icons.scss
Expand Up @@ -6,12 +6,14 @@
}

%svg-icon {
background: currentcolor;
content: "";
height: 1em;
mask-repeat: no-repeat;
mask-size: 100% 100%;
width: 1em;
@supports (mask-image: url()) {
background: currentcolor;
content: "";
height: 1em;
mask-repeat: no-repeat;
mask-size: 100% 100%;
width: 1em;
}
}

%admin-menu-icon {
Expand All @@ -37,11 +39,8 @@
}
}

@supports (mask-image: url()) {

&::#{$position} {
@extend %svg-icon;
mask-image: image-url("fontawesome/#{$style}/#{$icon}.svg");
}
&::#{$position} {
@extend %svg-icon;
mask-image: image-url("fontawesome/#{$style}/#{$icon}.svg");
}
}

0 comments on commit cdc31db

Please sign in to comment.