Fix Material theme to work with any combination of pyScss and MDI icons

':before' class doesn't work as expected with current versions of
xstatic-mdi and PyScss. It's a temporary workaround with copy ':before'
styles from MDI directly into the Material theme.

Closes-Bug: #1771559
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I969ad70065c580ba90bb0a050c7a9cf242d805ec
(cherry picked from commit f3bfa38341)
This commit is contained in:
Ivan Kolodyazhny 2020-05-22 13:02:46 +03:00 committed by Marc Gariépy
parent 664c6ec28e
commit ec5261cce5
7 changed files with 27 additions and 2 deletions

View File

@ -86,6 +86,9 @@ $icon-swap: (
@each $fa-icon, $mdi-icon in $icon-swap { @each $fa-icon, $mdi-icon in $icon-swap {
.fa-#{$fa-icon} { .fa-#{$fa-icon} {
&:before {
content: unquote("\"\\#{map-get($mdi-icons, $mdi-icon)}\"");
}
@extend .mdi-#{$mdi-icon}; @extend .mdi-#{$mdi-icon};
} }
} }

View File

@ -12,6 +12,7 @@
&:before { &:before {
@extend .mdi; @extend .mdi;
content: "\F131";
font-size: $font-size-h5; font-size: $font-size-h5;
} }
} }
@ -21,6 +22,7 @@
@extend .mdi-checkbox-marked; @extend .mdi-checkbox-marked;
&:before { &:before {
content: "\F132";
color: $brand-primary; color: $brand-primary;
} }
} }

View File

@ -2,4 +2,8 @@
@extend .mdi-stop; @extend .mdi-stop;
color: $gray-light; color: $gray-light;
font-size: $font-size-small; font-size: $font-size-small;
}
&:before {
content: "\F4DB";
}
}

View File

@ -3,6 +3,10 @@
@extend .mdi-arrow-right; @extend .mdi-arrow-right;
padding-right: $padding-base-horizontal; padding-right: $padding-base-horizontal;
&:before {
content: "\F054";
}
&-text { &-text {
display: none; display: none;
} }

View File

@ -2,4 +2,8 @@
@extend .mdi-stop; @extend .mdi-stop;
color: $gray-light; color: $gray-light;
font-size: $font-size-small; font-size: $font-size-small;
}
&:before {
content: "\F4DB";
}
}

View File

@ -15,6 +15,7 @@
font-size: $font-size-h5; font-size: $font-size-h5;
line-height: $font-size-h5; line-height: $font-size-h5;
vertical-align: middle; vertical-align: middle;
content: "\F43D";
} }
} }
@ -24,6 +25,7 @@
&:before { &:before {
color: $brand-primary; color: $brand-primary;
content: "\F43E";
} }
} }
} }

View File

@ -20,11 +20,17 @@
.hz-spinner-icon-up { .hz-spinner-icon-up {
@extend .mdi-plus; @extend .mdi-plus;
&:before {
content: "\F415";
}
} }
.hz-spinner-icon-down { .hz-spinner-icon-down {
@extend .mdi-minus; @extend .mdi-minus;
padding-right: $padding-xs-horizontal; padding-right: $padding-xs-horizontal;
&:before {
content: "\F374";
}
} }
&-container { &-container {