Make gr-button styles more affirmative

Some styles in gr-button had been accumulating :not's in their
selectors, resulting in some rules becoming too specific and overriding
others that they shouldn't (such as the active state for vote buttons).

With this change, the cascading properties are moved into affirmative
rules, resulting in cleaner CSS and no specificity conflict.

Change-Id: Icc1d90765eb1b284f9f7446ada47f30741e38003
This commit is contained in:
Wyatt Allen
2017-01-24 13:23:34 -08:00
parent 1e707e3b1a
commit 05c44b62f2

View File

@@ -80,8 +80,8 @@ limitations under the License.
:host([loading][disabled]) {
cursor: wait;
}
:host:focus:not([primary]):not([secondary]):not([disabled]):not([link]),
:host:hover:not([primary]):not([secondary]):not([disabled]):not([link]) {
:host:focus:not([link]),
:host:hover:not([link]) {
background-color: #f8f8f8;
border-color: #aaa;
}
@@ -97,6 +97,7 @@ limitations under the License.
}
:host([primary]:focus) {
box-shadow: 0 0 1px #00f;
background-color: #4d90fe;
}
:host([primary]:not([disabled]):hover) {
background-color: #4d90fe;
@@ -111,6 +112,7 @@ limitations under the License.
}
:host([secondary]:focus) {
box-shadow: 0 0 1px #f00;
background-color: #d14836;
}
:host([secondary]:not([disabled]):hover) {
background-color: #c53727;