Implement 'selector-append' sass function

'selector-append' is used in xstatic-mdi [1] but it isn't supported by
the latest pyScss.
As a workaround we use 'append-selector' function from pyScss until
'selector-append' will be supported.

This patch also reverts Ia9e1e807591d4428f585177f521d4cb9d463b917
because we don't need it anymore.

[1] https://opendev.org/openstack/xstatic-mdi/src/tag/1.6.50.2/xstatic/pkg/mdi/data/scss/_functions.scss#L2

Change-Id: Ib8ca0fcfe339cb68d6a157a00cbc2d34854ef4c5
Closes-Bug: #1771559
This commit is contained in:
Ivan Kolodyazhny 2020-04-14 12:19:29 +03:00
parent 754804667a
commit 74d76e900f
2 changed files with 10 additions and 3 deletions

View File

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

View File

@ -1,3 +1,12 @@
// NOTE(e0ne): it's temporary workaround to until specified function will
// be supported by pyScss. We need to define this function before any MDI
// usage.
@if not function-exists("selector-append") {
@function selector-append($selector, $to-append) {
@return append-selector($selector, $to-append);
}
}
@import "animations";
@import "icons";
@import "components/checkboxes";