|
| 1 | +// |
| 2 | +// Copyright 2017 Google Inc. All Rights Reserved. |
| 3 | +// |
| 4 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// you may not use this file except in compliance with the License. |
| 6 | +// You may obtain a copy of the License at |
| 7 | +// |
| 8 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +// |
| 10 | +// Unless required by applicable law or agreed to in writing, software |
| 11 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +// See the License for the specific language governing permissions and |
| 14 | +// limitations under the License. |
| 15 | +// |
| 16 | + |
| 17 | +@import "./keyframes"; |
| 18 | + |
| 19 | +// Ensure that styles needed by any component using MDC Ripple are emitted, but only once. |
| 20 | +// (Every component using MDC Ripple imports these mixins, but doesn't necessarily import mdc-ripple.scss.) |
| 21 | + |
| 22 | +// This variable is not intended to be overridden externally; it uses !default to avoid being reset |
| 23 | +// every time this file is imported. |
| 24 | +$mdc-ripple-common-styles-emitted_: false !default; |
| 25 | + |
| 26 | +@if not $mdc-ripple-common-styles-emitted_ { |
| 27 | + $mdc-ripple-common-styles-emitted_: true; |
| 28 | + |
| 29 | + @include mdc-ripple-keyframes_; |
| 30 | + |
| 31 | + // Styles used to detect buggy behavior of CSS custom properties in Edge. |
| 32 | + // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11495448/ |
| 33 | + // This is included in _mixins.scss rather than mdc-ripple.scss so that it will be |
| 34 | + // present for other components which rely on ripple as well as mdc-ripple itself. |
| 35 | + .mdc-ripple-surface--test-edge-var-bug { |
| 36 | + --mdc-ripple-surface-test-edge-var: 1px solid #000; |
| 37 | + |
| 38 | + visibility: hidden; |
| 39 | + |
| 40 | + &::before { |
| 41 | + border: var(--mdc-ripple-surface-test-edge-var); |
| 42 | + } |
| 43 | + } |
| 44 | +} |
0 commit comments