Files
nairobi/app/assets/stylesheets/mixins/icons.scss
Javi Martín 450d954526 Don't add default margin to font awesome icons
We were removing the margin half of the time, and sometimes removing it
made us use `!important` rules.
2021-06-30 15:01:47 +02:00

46 lines
829 B
SCSS

%font-icon {
@extend %fa-icon;
font-family: "Font Awesome 5 Free";
vertical-align: middle;
}
%svg-icon {
@supports (mask-image: url()) {
background: currentcolor;
content: "";
height: 1em;
mask-repeat: no-repeat;
mask-size: 100% 100%;
width: 1em;
}
}
%admin-menu-icon {
font-size: rem-calc(20);
margin-left: rem-calc(8);
margin-right: rem-calc(10);
}
@mixin has-fa-icon($icon, $style, $position: "before") {
&::#{$position} {
@extend %font-icon;
@extend .fa-#{$icon}:before;
@if $style == "solid" {
font-weight: bold;
} @else {
font-weight: normal;
}
@if $style == "brands" {
font-family: "Font Awesome 5 Brands";
}
}
&::#{$position} {
@extend %svg-icon;
mask-image: image-url("fontawesome/#{$style}/#{$icon}.svg");
}
}