|
10 | 10 | -webkit-tap-highlight-color: transparent; |
11 | 11 |
|
12 | 12 | // The ripple container should match the bounds of the entire button. |
13 | | - .mat-mdc-button-ripple, |
14 | | - .mat-mdc-button-persistent-ripple, |
15 | | - .mat-mdc-button-persistent-ripple::before { |
| 13 | + > .mat-mdc-button-ripple, |
| 14 | + > .mat-mdc-button-persistent-ripple, |
| 15 | + > .mat-mdc-button-persistent-ripple::before { |
16 | 16 | @include layout-common.fill; |
17 | 17 |
|
18 | 18 | // Disable pointer events for the ripple container and state overlay because the container |
|
29 | 29 |
|
30 | 30 | // This style used to be applied by the MatRipple |
31 | 31 | // directive, which is no longer attached to this element. |
32 | | - .mat-mdc-button-ripple { |
| 32 | + > .mat-mdc-button-ripple { |
33 | 33 | overflow: hidden; |
34 | 34 | } |
35 | 35 |
|
36 | 36 | // We use ::before so that we can reuse some of MDC's theming. |
37 | | - .mat-mdc-button-persistent-ripple::before { |
| 37 | + > .mat-mdc-button-persistent-ripple::before { |
38 | 38 | content: ''; |
39 | 39 | opacity: 0; |
40 | 40 | } |
41 | 41 |
|
42 | 42 | // The content should appear over the state and ripple layers, otherwise they may adversely affect |
43 | 43 | // the accessibility of the text content. |
44 | | - .mdc-button__label, |
45 | | - .mat-icon { |
| 44 | + > .mdc-button__label, |
| 45 | + > .mat-icon { |
46 | 46 | z-index: 1; |
47 | 47 | position: relative; |
48 | 48 | } |
49 | 49 |
|
50 | 50 | // The focus indicator should match the bounds of the entire button. |
51 | | - .mat-focus-indicator { |
| 51 | + > .mat-focus-indicator { |
52 | 52 | @include layout-common.fill(); |
53 | 53 | } |
54 | 54 |
|
55 | | - &:focus .mat-focus-indicator::before { |
| 55 | + &:focus > .mat-focus-indicator::before { |
56 | 56 | content: ''; |
57 | 57 | } |
58 | 58 | } |
59 | 59 |
|
60 | 60 | @mixin mat-private-button-ripple($prefix, $slots) { |
61 | 61 | @include token-utils.use-tokens($prefix, $slots) { |
62 | | - .mat-ripple-element { |
| 62 | + > .mat-ripple-element { |
63 | 63 | @include token-utils.create-token-slot(background-color, ripple-color); |
64 | 64 | } |
65 | 65 |
|
66 | | - .mat-mdc-button-persistent-ripple::before { |
| 66 | + > .mat-mdc-button-persistent-ripple::before { |
67 | 67 | @include token-utils.create-token-slot(background-color, state-layer-color); |
68 | 68 | } |
69 | 69 |
|
70 | | - &.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before { |
| 70 | + &.mat-mdc-button-disabled > .mat-mdc-button-persistent-ripple::before { |
71 | 71 | @include token-utils.create-token-slot(background-color, disabled-state-layer-color); |
72 | 72 | } |
73 | 73 |
|
74 | | - &:hover .mat-mdc-button-persistent-ripple::before { |
| 74 | + &:hover > .mat-mdc-button-persistent-ripple::before { |
75 | 75 | @include token-utils.create-token-slot(opacity, hover-state-layer-opacity); |
76 | 76 | } |
77 | 77 |
|
78 | 78 | &.cdk-program-focused, |
79 | 79 | &.cdk-keyboard-focused, |
80 | 80 | &.mat-mdc-button-disabled-interactive:focus { |
81 | | - .mat-mdc-button-persistent-ripple::before { |
| 81 | + > .mat-mdc-button-persistent-ripple::before { |
82 | 82 | @include token-utils.create-token-slot(opacity, focus-state-layer-opacity); |
83 | 83 | } |
84 | 84 | } |
85 | 85 |
|
86 | | - &:active .mat-mdc-button-persistent-ripple::before { |
| 86 | + &:active > .mat-mdc-button-persistent-ripple::before { |
87 | 87 | @include token-utils.create-token-slot(opacity, pressed-state-layer-opacity); |
88 | 88 | } |
89 | 89 | } |
|
116 | 116 | } |
117 | 117 |
|
118 | 118 | @mixin mat-private-button-touch-target($is-square, $prefix, $slots) { |
119 | | - .mat-mdc-button-touch-target { |
| 119 | + > .mat-mdc-button-touch-target { |
120 | 120 | position: absolute; |
121 | 121 | top: 50%; |
122 | 122 | height: 48px; |
|
0 commit comments