summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kolodyazhny <e0ne@e0ne.info>2020-05-22 13:02:46 +0300
committerMarc GariƩpy <gariepy.marc@gmail.com>2021-03-19 16:37:06 +0000
commitec5261cce58b7ee84f1fa6afa54a52738b81bfae (patch)
treed935bd2db3461d187e5ef496043c0a1829a79bdc
parent664c6ec28ec56ffd7474fba7ebce43dbdcf65543 (diff)
downloadhorizon-ec5261cce58b7ee84f1fa6afa54a52738b81bfae.tar.gz
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 f3bfa383417b270fce384fee18c5cb470cec15f7)
-rw-r--r--openstack_dashboard/themes/material/static/horizon/_icons.scss3
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_checkboxes.scss2
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_context_selection.scss6
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_datepicker.scss4
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_navbar.scss6
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_radiobuttons.scss2
-rw-r--r--openstack_dashboard/themes/material/static/horizon/components/_spinners.scss6
7 files changed, 27 insertions, 2 deletions
diff --git a/openstack_dashboard/themes/material/static/horizon/_icons.scss b/openstack_dashboard/themes/material/static/horizon/_icons.scss
index 2509ae478..7f331d6a2 100644
--- a/openstack_dashboard/themes/material/static/horizon/_icons.scss
+++ b/openstack_dashboard/themes/material/static/horizon/_icons.scss
@@ -86,6 +86,9 @@ $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};
}
}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_checkboxes.scss b/openstack_dashboard/themes/material/static/horizon/components/_checkboxes.scss
index 585bc4a21..6ccf2ac27 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_checkboxes.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_checkboxes.scss
@@ -12,6 +12,7 @@
&:before {
@extend .mdi;
+ content: "\F131";
font-size: $font-size-h5;
}
}
@@ -21,6 +22,7 @@
@extend .mdi-checkbox-marked;
&:before {
+ content: "\F132";
color: $brand-primary;
}
}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_context_selection.scss b/openstack_dashboard/themes/material/static/horizon/components/_context_selection.scss
index d94cfd16c..c0fe9b611 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_context_selection.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_context_selection.scss
@@ -2,4 +2,8 @@
@extend .mdi-stop;
color: $gray-light;
font-size: $font-size-small;
-} \ No newline at end of file
+
+ &:before {
+ content: "\F4DB";
+ }
+}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_datepicker.scss b/openstack_dashboard/themes/material/static/horizon/components/_datepicker.scss
index d967c72a0..4e28b8abd 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_datepicker.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_datepicker.scss
@@ -3,6 +3,10 @@
@extend .mdi-arrow-right;
padding-right: $padding-base-horizontal;
+ &:before {
+ content: "\F054";
+ }
+
&-text {
display: none;
}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_navbar.scss b/openstack_dashboard/themes/material/static/horizon/components/_navbar.scss
index d94cfd16c..c0fe9b611 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_navbar.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_navbar.scss
@@ -2,4 +2,8 @@
@extend .mdi-stop;
color: $gray-light;
font-size: $font-size-small;
-} \ No newline at end of file
+
+ &:before {
+ content: "\F4DB";
+ }
+}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_radiobuttons.scss b/openstack_dashboard/themes/material/static/horizon/components/_radiobuttons.scss
index 6769911c3..b1ea3e79d 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_radiobuttons.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_radiobuttons.scss
@@ -15,6 +15,7 @@
font-size: $font-size-h5;
line-height: $font-size-h5;
vertical-align: middle;
+ content: "\F43D";
}
}
@@ -24,6 +25,7 @@
&:before {
color: $brand-primary;
+ content: "\F43E";
}
}
}
diff --git a/openstack_dashboard/themes/material/static/horizon/components/_spinners.scss b/openstack_dashboard/themes/material/static/horizon/components/_spinners.scss
index a5b5f725d..6fbca1e29 100644
--- a/openstack_dashboard/themes/material/static/horizon/components/_spinners.scss
+++ b/openstack_dashboard/themes/material/static/horizon/components/_spinners.scss
@@ -20,11 +20,17 @@
.hz-spinner-icon-up {
@extend .mdi-plus;
+ &:before {
+ content: "\F415";
+ }
}
.hz-spinner-icon-down {
@extend .mdi-minus;
padding-right: $padding-xs-horizontal;
+ &:before {
+ content: "\F374";
+ }
}
&-container {