diff options
author | Ivan Kolodyazhny <e0ne@e0ne.info> | 2020-04-14 12:19:29 +0300 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2020-04-20 11:49:53 +0900 |
commit | f26c88721614d1c25bcd26740b8fb20a7a97bd05 (patch) | |
tree | aeb5b4779538b72ba7b14ee64298877aeb3fd4ba | |
parent | 30121e3e0adcc44d23d95ccde25a7f38d9a7c18f (diff) | |
download | horizon-f26c88721614d1c25bcd26740b8fb20a7a97bd05.tar.gz |
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
stable/train backport:
A release note on the known issue is now removed as it is fixed
by this commit. Instead, a note on the workaround by this commit
is added.
Change-Id: Ib8ca0fcfe339cb68d6a157a00cbc2d34854ef4c5
Closes-Bug: #1771559
(cherry picked from commit 74d76e900f28e88190a35bff921c56349077ca53)
-rw-r--r-- | openstack_dashboard/themes/material/static/horizon/_styles.scss | 9 | ||||
-rw-r--r-- | releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml | 12 |
2 files changed, 13 insertions, 8 deletions
diff --git a/openstack_dashboard/themes/material/static/horizon/_styles.scss b/openstack_dashboard/themes/material/static/horizon/_styles.scss index 047af9943..8b0775727 100644 --- a/openstack_dashboard/themes/material/static/horizon/_styles.scss +++ b/openstack_dashboard/themes/material/static/horizon/_styles.scss @@ -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"; diff --git a/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml b/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml index cdf8a2a0c..ed0b35118 100644 --- a/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml +++ b/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml @@ -1,13 +1,9 @@ --- -issues: - - | - The material design theme is now broken with pyScss 1.3.7 - (also see the upgrade notice section). - If you really depends on the material design theme, keep using - pyScss 1.3.4 with setuptools<45 (while the horizon dependencies list - says pyScss>=1.3.7 is required). - The issue is tracked via [:bug:`1771559`]. upgrade: - | pyScss 1.3.7 is now required due to the incompatibility that pyScss 1.3.4 used before in horizon does not work with setuptools 46. + - | + Along with the upgrade of pyScss to 1.3.7, a workaround for the + material design theme is added to make it work properly. + See [:bug:`1771559`] for detail. |