Skip to content

Commit

Permalink
fix(ripple): Move feature detect CSS to mixins (#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfranqueiro authored Sep 15, 2017
1 parent a566b81 commit 628b8c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
15 changes: 15 additions & 0 deletions packages/mdc-ripple/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,18 @@
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
}
}

// Styles used to detect buggy behavior of CSS custom properties in Edge.
// See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/
// This is included in _mixins.scss rather than mdc-ripple.scss so that it will be
// present for other components which rely on ripple as well as mdc-ripple itself.

.mdc-ripple-surface--test-edge-var-bug {
--mdc-ripple-surface-test-edge-var: 1px solid #000;

visibility: hidden;

&::before {
border: var(--mdc-ripple-surface-test-edge-var);
}
}
16 changes: 0 additions & 16 deletions packages/mdc-ripple/mdc-ripple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,4 @@
}
}

// Styles used to detect buggy behavior of CSS custom properties in Edge
// See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/

.mdc-ripple-surface--test-edge-var-bug {
// stylelint-disable plugin/selector-bem-pattern
// bem linter is disabled because it cannot correctly reconcile mdc prefix for css variables.
--mdc-ripple-surface-test-edge-var: 1px solid #000;
// stylelint-enable plugin/selector-bem-pattern

visibility: hidden;

&::before {
border: var(--mdc-ripple-surface-test-edge-var);
}
}

// postcss-bem-linter: end

0 comments on commit 628b8c4

Please sign in to comment.