Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | @use '../../../cdk/a11y';
|
---|
| 2 |
|
---|
| 3 | @mixin ripple() {
|
---|
| 4 | // The host element of an mat-ripple directive should always have a position of "absolute" or
|
---|
| 5 | // "relative" so that the ripples inside are correctly positioned relatively to the container.
|
---|
| 6 | .mat-ripple {
|
---|
| 7 | overflow: hidden;
|
---|
| 8 |
|
---|
| 9 | // By default, every ripple container should have position: relative in favor of creating an
|
---|
| 10 | // easy API for developers using the MatRipple directive.
|
---|
| 11 | position: relative;
|
---|
| 12 |
|
---|
| 13 | // Promote containers that have ripples to a new layer. We want to target `:not(:empty)`,
|
---|
| 14 | // because we don't want all ripple containers to have their own layer since they're used in a
|
---|
| 15 | // lot of places and the layer is only relevant while animating. Note that ideally we'd use
|
---|
| 16 | // the `contain` property here (see #13175), because `:empty` can be broken by having extra
|
---|
| 17 | // text inside the element, but it isn't very well supported yet.
|
---|
| 18 | &:not(:empty) {
|
---|
| 19 | transform: translateZ(0);
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | .mat-ripple.mat-ripple-unbounded {
|
---|
| 24 | overflow: visible;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | .mat-ripple-element {
|
---|
| 28 | position: absolute;
|
---|
| 29 | border-radius: 50%;
|
---|
| 30 | pointer-events: none;
|
---|
| 31 |
|
---|
| 32 | transition: opacity, transform 0ms cubic-bezier(0, 0, 0.2, 1);
|
---|
| 33 | transform: scale(0);
|
---|
| 34 |
|
---|
| 35 | // In high contrast mode the ripple is opaque, causing it to obstruct the content.
|
---|
| 36 | @include a11y.high-contrast(active, off) {
|
---|
| 37 | display: none;
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.