1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | @use '@material/feature-targeting/feature-targeting';
|
27 | @use '@material/ripple/ripple';
|
28 | @use '@material/ripple/ripple-theme';
|
29 | @use '@material/rtl/mixins' as rtl;
|
30 | @use '@material/theme/theme';
|
31 | @use '@material/touch-target/mixins' as touch;
|
32 | @use './variables';
|
33 |
|
34 | $ripple-target: '.mdc-deprecated-chip-trailing-action__ripple';
|
35 |
|
36 | @mixin core-styles($query: feature-targeting.all()) {
|
37 | @include without-ripple($query: $query);
|
38 | @include ripple($query: $query);
|
39 | }
|
40 |
|
41 | @mixin without-ripple($query: feature-targeting.all()) {
|
42 | $feat-structure: feature-targeting.create-target($query, structure);
|
43 | $feat-color: feature-targeting.create-target($query, color);
|
44 |
|
45 | @include touch.wrapper($query);
|
46 | @include _touch-target-base($query);
|
47 |
|
48 | .mdc-deprecated-chip-trailing-action {
|
49 | @include size(variables.$size, $query);
|
50 | @include color(variables.$color, $query);
|
51 | @include touch-target-width(variables.$touch-target-width, $query);
|
52 |
|
53 | @include feature-targeting.targets($feat-structure) {
|
54 | border: none;
|
55 | display: inline-flex;
|
56 | position: relative;
|
57 | align-items: center;
|
58 | justify-content: center;
|
59 | box-sizing: border-box;
|
60 | padding: 0;
|
61 | outline: none;
|
62 | cursor: pointer;
|
63 | -webkit-appearance: none;
|
64 | }
|
65 |
|
66 | @include feature-targeting.targets($feat-color) {
|
67 | background: none;
|
68 | }
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | .mdc-deprecated-chip-trailing-action__icon {
|
74 | @include feature-targeting.targets($feat-color) {
|
75 | fill: currentColor;
|
76 | color: inherit;
|
77 | }
|
78 | }
|
79 | }
|
80 | }
|
81 |
|
82 | @mixin ripple($query: feature-targeting.all()) {
|
83 | @include ripple.common($query);
|
84 | $feat-structure: feature-targeting.create-target($query, structure);
|
85 |
|
86 | .mdc-deprecated-chip-trailing-action {
|
87 | @include ripple.surface($query: $query, $ripple-target: $ripple-target);
|
88 | @include ripple.radius-unbounded(
|
89 | $query: $query,
|
90 | $ripple-target: $ripple-target
|
91 | );
|
92 | @include ripple-theme.states(
|
93 | variables.$ripple-color,
|
94 | $query: $query,
|
95 | $ripple-target: $ripple-target
|
96 | );
|
97 |
|
98 | #{$ripple-target} {
|
99 | @include feature-targeting.targets($feat-structure) {
|
100 | position: absolute;
|
101 |
|
102 |
|
103 | box-sizing: content-box;
|
104 | width: 100%;
|
105 | height: 100%;
|
106 | overflow: hidden;
|
107 | }
|
108 | }
|
109 | }
|
110 | }
|
111 |
|
112 |
|
113 |
|
114 | @mixin color($color, $query: feature-targeting.all()) {
|
115 | $feat-color: feature-targeting.create-target($query, color);
|
116 |
|
117 | .mdc-deprecated-chip-trailing-action {
|
118 | @include feature-targeting.targets($feat-color) {
|
119 | @include theme.property(color, $color);
|
120 | }
|
121 | }
|
122 | }
|
123 |
|
124 |
|
125 |
|
126 | @mixin size($size, $query: feature-targeting.all()) {
|
127 | $feat-structure: feature-targeting.create-target($query, structure);
|
128 |
|
129 | .mdc-deprecated-chip-trailing-action__icon {
|
130 | @include feature-targeting.targets($feat-structure) {
|
131 | height: $size;
|
132 | width: $size;
|
133 | font-size: $size;
|
134 | }
|
135 | }
|
136 | }
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | @mixin horizontal-spacing($left, $right, $query: feature-targeting.all()) {
|
142 | $feat-structure: feature-targeting.create-target($query, structure);
|
143 |
|
144 | .mdc-deprecated-chip-trailing-action {
|
145 | @include feature-targeting.targets($feat-structure) {
|
146 | @include rtl.reflexive-property(margin, $left, $right);
|
147 | }
|
148 | }
|
149 | }
|
150 |
|
151 |
|
152 |
|
153 | @mixin touch-target-width($width, $query: feature-targeting.all()) {
|
154 | $feat-structure: feature-targeting.create-target($query, structure);
|
155 |
|
156 | .mdc-deprecated-chip-trailing-action__touch {
|
157 | @include feature-targeting.targets($feat-structure) {
|
158 | width: $width;
|
159 | }
|
160 | }
|
161 | }
|
162 |
|
163 |
|
164 |
|
165 | @mixin _touch-target-base($query: feature-targeting.all()) {
|
166 | .mdc-deprecated-chip-trailing-action__touch {
|
167 | @include touch.touch-target($set-width: true, $query: $query);
|
168 | }
|
169 | }
|