Fix disabled primary/secondary buttons
Because the disabled and the primary/raised rules have the same
specificity, the disabled definition needs to be defined below so in the
event both conditions are met, it takes precedence.
Bug: Issue 7940
Change-Id: I5ea8e9527ee5fffa3219702f3963853d887bd085
diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button.html b/polygerrit-ui/app/elements/shared/gr-button/gr-button.html
index 18ed298..2d61d18 100644
--- a/polygerrit-ui/app/elements/shared/gr-button/gr-button.html
+++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button.html
@@ -57,12 +57,6 @@
), var(--background-color);
}
- :host([disabled]) {
- --background-color: #eaeaea;
- --button-color: #a8a8a8;
- cursor: default;
- }
-
/* Styles for raised buttons specifically */
:host([primary][raised]),
:host([secondary][raised]) {
@@ -70,6 +64,14 @@
--button-color: #fff;
}
+ /* Keep below color definition for primary/secondary so that this takes
+ precedence when disabled. */
+ :host([disabled]) {
+ --background-color: #eaeaea;
+ --button-color: #a8a8a8;
+ cursor: default;
+ }
+
/* Styles for link buttons specifically */
:host([link]) {
--background-color: transparent;