[Bug 1771559] Re: error while loading icon with pyscss 1.3.5
wdoekes
1771559 at bugs.launchpad.net
Tue Oct 29 15:32:42 UTC 2019
$ pip freeze | grep pyScss
pyScss==1.3.4
$ python -m scss --style compact xstatic/pkg/mdi/data/scss/materialdesignicons.scss 2>&1 | uniq -c | head -n 10
1650 ERROR: Function not found: function-exists:1
1 @font-face { font-family: 'Material Design Icons'; src: url('../fonts/materialdesignicons-webfont.eot?v=1.6.50'); src: url('../fonts/materialdesignicons-webfont.eot?#iefix&v=1.6.50') format('embedded-opentype'), url('../fonts/materialdesignicons-webfont.woff2?v=1.6.50') format('woff2'), url('../fonts/materialdesignicons-webfont.woff?v=1.6.50') format('woff'), url('../fonts/materialdesignicons-webfont.ttf?v=1.6.50') format('truetype'), url('../fonts/materialdesignicons-webfont.svg?v=1.6.50#materialdesigniconsregular') format('svg'); font-weight: normal; font-style: normal; }
1 .mdi { display: inline-block; font: normal normal normal 24px / 1 'Material Design Icons'; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); }
1 .mdi-access-point:before { content: "\F002"; }
1
1 .mdi-access-point-network:before { content: "\F003"; }
1
1 .mdi-account:before { content: "\F004"; }
1
1 .mdi-account-alert:before { content: "\F005"; }
$ pip freeze | grep pyScss
pyScss==1.3.5
$ python -m scss --style compact xstatic/pkg/mdi/data/scss/materialdesignicons.scss 2>&1 | uniq -c | head -n 10
1 @font-face { font-family: 'Material Design Icons'; src: url('../fonts/materialdesignicons-webfont.eot?v=1.6.50'); src: url('../fonts/materialdesignicons-webfont.eot?#iefix&v=1.6.50') format('embedded-opentype'), url('../fonts/materialdesignicons-webfont.woff2?v=1.6.50') format('woff2'), url('../fonts/materialdesignicons-webfont.woff?v=1.6.50') format('woff'), url('../fonts/materialdesignicons-webfont.ttf?v=1.6.50') format('truetype'), url('../fonts/materialdesignicons-webfont.svg?v=1.6.50#materialdesigniconsregular') format('svg'); font-weight: normal; font-style: normal; }
1
1 .mdi { display: inline-block; font: normal normal normal 24px / 1 'Material Design Icons'; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); }
1
1 .mdi-access-point:before { content: "xF002"; }
1
1 .mdi-access-point-network:before { content: "xF003"; }
1
1 .mdi-account:before { content: "xF004"; }
1
So yes. \F004 is right, and xF004 is wrong. But those 1650 errors are
wrong too.
It looks strange to me that pyScss takes the path of the existing
function when it doesn't exist. (1.3.4 said 'function-exist' doesn't
exists, and then took that path, see patch below).
This may also have been a fix that would work for 1.3.4 and 1.3.5:
$ diff -pu xstatic/pkg/mdi/data/scss/_functions.scss{.orig,}
--- xstatic/pkg/mdi/data/scss/_functions.scss.orig 2019-10-29 16:27:09.640420707 +0100
+++ xstatic/pkg/mdi/data/scss/_functions.scss 2019-10-29 16:27:24.256440797 +0100
@@ -1,14 +1,5 @@
@function char($character-code) {
- @if function-exists("selector-append") {
- @return unquote("\"\\#{$character-code}\"");
- }
-
- @if "\\#{'x'}" == "\\x" {
- @return str-slice("\x", 1, 1) + $character-code;
- }
- @else {
- @return #{"\"\\"}#{$character-code + "\""};
- }
+ @return unquote("\"\\#{$character-code}\"");
}
@function mdi($name) {
I cannot speak for the validity of the scss/sass syntax and whether or not the undefined function should've been run. Not my cup of tea.
Walter Doekes
OSSO B.V.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-pyscss in Ubuntu.
https://bugs.launchpad.net/bugs/1771559
Title:
error while loading icon with pyscss 1.3.5
Status in OpenStack Dashboard (Horizon):
New
Status in python-pyscss package in Ubuntu:
Confirmed
Bug description:
Hello,
Impossible to fetch font awesome icons with material design theme (provided in the package)
No error in the web development console, but browser show symbol number like "xf44f" instead of showing icons.
STEPS TO REPRODUCE:
Use Chrome web browser
Login to horizon
Change theme to "Material"
Try to use Horizon as usual
Regards.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1771559/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list