Skip to content

Commit

Permalink
style(checkbox): Sort CSS so there is no descending specificity (#1939)
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnmercier committed Jan 11, 2018
1 parent 6b1cabb commit ffff10c
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions packages/mdc-checkbox/mdc-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@
@include mdc-checkbox--disabled_;
}

.mdc-checkbox__background {
@include mdc-checkbox__background_;
}

.mdc-checkbox__checkmark {
@include mdc-checkbox__checkmark_;
}

.mdc-checkbox__checkmark__path {
@include mdc-checkbox__checkmark__path_;
}

.mdc-checkbox__mixedmark {
@include mdc-checkbox__mixedmark_;
}

// JS checkbox
.mdc-checkbox--upgraded {
.mdc-checkbox__background,
Expand All @@ -58,10 +74,6 @@
@include mdc-checkbox--anim_;
}

.mdc-checkbox__background {
@include mdc-checkbox__background_;
}

.mdc-checkbox__native-control:enabled:checked ~ .mdc-checkbox__background,
.mdc-checkbox__native-control:enabled:indeterminate ~ .mdc-checkbox__background {
@include mdc-checkbox__background--marked_;
Expand All @@ -72,14 +84,14 @@
@include mdc-checkbox__focus-indicator_;
}

.mdc-checkbox__native-control:focus ~ .mdc-checkbox__background::before {
@include mdc-checkbox__focus-indicator--focused_;
}

.mdc-ripple-upgraded--unbounded .mdc-checkbox__background::before {
@include mdc-checkbox__focus-indicator--ripple-upgraded-unbounded_;
}

.mdc-checkbox__native-control:focus ~ .mdc-checkbox__background::before {
@include mdc-checkbox__focus-indicator--focused_;
}

.mdc-checkbox__native-control {
@include mdc-checkbox__native-control_;

Expand All @@ -88,10 +100,6 @@
}
}

.mdc-checkbox__checkmark {
@include mdc-checkbox__checkmark_;
}

.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background .mdc-checkbox__checkmark {
@include mdc-checkbox__checkmark--checked_;
}
Expand All @@ -100,19 +108,11 @@
@include mdc-checkbox__checkmark--indeterminate_;
}

.mdc-checkbox__checkmark__path {
@include mdc-checkbox__checkmark__path_;
}

.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background .mdc-checkbox__checkmark__path,
.mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background .mdc-checkbox__checkmark__path {
@include mdc-checkbox__checkmark__path--marked_;
}

.mdc-checkbox__mixedmark {
@include mdc-checkbox__mixedmark_;
}

.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background .mdc-checkbox__mixedmark {
@include mdc-checkbox__mixedmark--checked_;
}
Expand Down

0 comments on commit ffff10c

Please sign in to comment.