Skip to content

Commit

Permalink
fix(checkbox): Ignore CSS variables in Edge for __background::before
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Sep 29, 2017
1 parent a7e2db4 commit 67129e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/mdc-checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,11 @@ not return an object.

## Theming

> TK once mdc-theming lands.
MDC Checkboxes use the theme's primary color by default for checked and indeterminate states, and are completely dark theme
aware.

### Caveat: Edge and CSS Variables

In browsers that fully support CSS variables, MDC Checkbox references CSS variables wherever theme properties are used.
However, due to Edge's buggy CSS variable support, the `background-color` for `.mdc-checkbox__background::before` will not honor CSS variables in Edge.
This means you will need to override this style manually for Edge if you alter the CSS variable for the primary color.
2 changes: 1 addition & 1 deletion packages/mdc-checkbox/mdc-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
// The frame's ::before element is used as a focus indicator for the checkbox
&::before {
@include mdc-checkbox-cover-element;
@include mdc-theme-prop(background, primary);
@include mdc-theme-prop(background, primary, $edgeOptOut: true);

width: 100%;
height: 100%;
Expand Down

0 comments on commit 67129e9

Please sign in to comment.