material_components_web-sass 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +97 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/material_components_web-sass.rb +52 -0
- data/lib/material_components_web/sass/engine.rb +18 -0
- data/lib/material_components_web/sass/version.rb +5 -0
- data/material_components_web-sass.gemspec +32 -0
- data/vendor/assets/fonts/material-icons/LICENSE +202 -0
- data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
- data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
- data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
- data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
- data/vendor/assets/fonts/roboto/LICENSE.txt +202 -0
- data/vendor/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/vendor/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/vendor/assets/javascripts/material-components-web.js +5492 -0
- data/vendor/assets/stylesheets/@material/animation/_functions.scss +25 -0
- data/vendor/assets/stylesheets/@material/animation/_mixins.scss +29 -0
- data/vendor/assets/stylesheets/@material/animation/_variables.scss +19 -0
- data/vendor/assets/stylesheets/@material/animation/mdc-animation.scss +31 -0
- data/vendor/assets/stylesheets/@material/button/mdc-button.scss +199 -0
- data/vendor/assets/stylesheets/@material/card/mdc-card.scss +179 -0
- data/vendor/assets/stylesheets/@material/checkbox/_keyframes.scss +180 -0
- data/vendor/assets/stylesheets/@material/checkbox/_variables.scss +31 -0
- data/vendor/assets/stylesheets/@material/checkbox/mdc-checkbox.scss +310 -0
- data/vendor/assets/stylesheets/@material/drawer/_mixins.scss +145 -0
- data/vendor/assets/stylesheets/@material/drawer/mdc-drawer.scss +18 -0
- data/vendor/assets/stylesheets/@material/drawer/permanent/mdc-permanent-drawer.scss +54 -0
- data/vendor/assets/stylesheets/@material/drawer/temporary/mdc-temporary-drawer.scss +134 -0
- data/vendor/assets/stylesheets/@material/elevation/_mixins.scss +68 -0
- data/vendor/assets/stylesheets/@material/elevation/_variables.scss +122 -0
- data/vendor/assets/stylesheets/@material/elevation/mdc-elevation.scss +27 -0
- data/vendor/assets/stylesheets/@material/fab/mdc-fab.scss +122 -0
- data/vendor/assets/stylesheets/@material/fonts/material-icons.scss +36 -0
- data/vendor/assets/stylesheets/@material/fonts/roboto.scss +45 -0
- data/vendor/assets/stylesheets/@material/form-field/mdc-form-field.scss +64 -0
- data/vendor/assets/stylesheets/@material/icon-toggle/mdc-icon-toggle.scss +133 -0
- data/vendor/assets/stylesheets/@material/list/mdc-list.scss +207 -0
- data/vendor/assets/stylesheets/@material/menu/mdc-menu.scss +22 -0
- data/vendor/assets/stylesheets/@material/menu/simple/mdc-simple-menu.scss +194 -0
- data/vendor/assets/stylesheets/@material/radio/mdc-radio.scss +198 -0
- data/vendor/assets/stylesheets/@material/ripple/_keyframes.scss +61 -0
- data/vendor/assets/stylesheets/@material/ripple/_mixins.scss +196 -0
- data/vendor/assets/stylesheets/@material/ripple/_variables.scss +17 -0
- data/vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss +80 -0
- data/vendor/assets/stylesheets/@material/rtl/_mixins.scss +251 -0
- data/vendor/assets/stylesheets/@material/select/mdc-select.scss +174 -0
- data/vendor/assets/stylesheets/@material/snackbar/_variables.scss +22 -0
- data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +126 -0
- data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +512 -0
- data/vendor/assets/stylesheets/@material/theme/_constants.scss +285 -0
- data/vendor/assets/stylesheets/@material/theme/_functions.scss +64 -0
- data/vendor/assets/stylesheets/@material/theme/_mixins.scss +104 -0
- data/vendor/assets/stylesheets/@material/theme/_variables.scss +80 -0
- data/vendor/assets/stylesheets/@material/theme/mdc-theme.scss +43 -0
- data/vendor/assets/stylesheets/@material/typography/_mixins.scss +45 -0
- data/vendor/assets/stylesheets/@material/typography/_variables.scss +109 -0
- data/vendor/assets/stylesheets/@material/typography/mdc-typography.scss +32 -0
- data/vendor/assets/stylesheets/_material-components-web.scss +36 -0
- metadata +195 -0
@@ -0,0 +1,285 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2016 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
|
+
/*
|
18
|
+
Precomputed linear color channel values, for use in contrast calculations.
|
19
|
+
See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
20
|
+
|
21
|
+
Algorithm, for c in 0 to 255:
|
22
|
+
f(c) {
|
23
|
+
c = c / 255;
|
24
|
+
return c < 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
25
|
+
}
|
26
|
+
|
27
|
+
This lookup table is needed since there is no `pow` in SASS.
|
28
|
+
*/
|
29
|
+
$mdc-theme-linear-channel-values:
|
30
|
+
0
|
31
|
+
.0003035269835488375
|
32
|
+
.000607053967097675
|
33
|
+
.0009105809506465125
|
34
|
+
.00121410793419535
|
35
|
+
.0015176349177441874
|
36
|
+
.001821161901293025
|
37
|
+
.0021246888848418626
|
38
|
+
.0024282158683907
|
39
|
+
.0027317428519395373
|
40
|
+
.003035269835488375
|
41
|
+
.003346535763899161
|
42
|
+
.003676507324047436
|
43
|
+
.004024717018496307
|
44
|
+
.004391442037410293
|
45
|
+
.004776953480693729
|
46
|
+
.005181516702338386
|
47
|
+
.005605391624202723
|
48
|
+
.006048833022857054
|
49
|
+
.006512090792594475
|
50
|
+
.006995410187265387
|
51
|
+
.007499032043226175
|
52
|
+
.008023192985384994
|
53
|
+
.008568125618069307
|
54
|
+
.009134058702220787
|
55
|
+
.00972121732023785
|
56
|
+
.010329823029626936
|
57
|
+
.010960094006488246
|
58
|
+
.011612245179743885
|
59
|
+
.012286488356915872
|
60
|
+
.012983032342173012
|
61
|
+
.013702083047289686
|
62
|
+
.014443843596092545
|
63
|
+
.01520851442291271
|
64
|
+
.01599629336550963
|
65
|
+
.016807375752887384
|
66
|
+
.017641954488384078
|
67
|
+
.018500220128379697
|
68
|
+
.019382360956935723
|
69
|
+
.0202885630566524
|
70
|
+
.021219010376003555
|
71
|
+
.022173884793387385
|
72
|
+
.02315336617811041
|
73
|
+
.024157632448504756
|
74
|
+
.02518685962736163
|
75
|
+
.026241221894849898
|
76
|
+
.027320891639074894
|
77
|
+
.028426039504420793
|
78
|
+
.0295568344378088
|
79
|
+
.030713443732993635
|
80
|
+
.03189603307301153
|
81
|
+
.033104766570885055
|
82
|
+
.03433980680868217
|
83
|
+
.03560131487502034
|
84
|
+
.03688945040110004
|
85
|
+
.0382043715953465
|
86
|
+
.03954623527673284
|
87
|
+
.04091519690685319
|
88
|
+
.042311410620809675
|
89
|
+
.043735029256973465
|
90
|
+
.04518620438567554
|
91
|
+
.046665086336880095
|
92
|
+
.04817182422688942
|
93
|
+
.04970656598412723
|
94
|
+
.05126945837404324
|
95
|
+
.052860647023180246
|
96
|
+
.05448027644244237
|
97
|
+
.05612849004960009
|
98
|
+
.05780543019106723
|
99
|
+
.0595112381629812
|
100
|
+
.06124605423161761
|
101
|
+
.06301001765316767
|
102
|
+
.06480326669290577
|
103
|
+
.06662593864377289
|
104
|
+
.06847816984440017
|
105
|
+
.07036009569659588
|
106
|
+
.07227185068231748
|
107
|
+
.07421356838014963
|
108
|
+
.07618538148130785
|
109
|
+
.07818742180518633
|
110
|
+
.08021982031446832
|
111
|
+
.0822827071298148
|
112
|
+
.08437621154414882
|
113
|
+
.08650046203654976
|
114
|
+
.08865558628577294
|
115
|
+
.09084171118340768
|
116
|
+
.09305896284668745
|
117
|
+
.0953074666309647
|
118
|
+
.09758734714186246
|
119
|
+
.09989872824711389
|
120
|
+
.10224173308810132
|
121
|
+
.10461648409110419
|
122
|
+
.10702310297826761
|
123
|
+
.10946171077829933
|
124
|
+
.1119324278369056
|
125
|
+
.11443537382697373
|
126
|
+
.11697066775851084
|
127
|
+
.11953842798834562
|
128
|
+
.12213877222960187
|
129
|
+
.12477181756095049
|
130
|
+
.12743768043564743
|
131
|
+
.1301364766903643
|
132
|
+
.13286832155381798
|
133
|
+
.13563332965520566
|
134
|
+
.13843161503245183
|
135
|
+
.14126329114027164
|
136
|
+
.14412847085805777
|
137
|
+
.14702726649759498
|
138
|
+
.14995978981060856
|
139
|
+
.15292615199615017
|
140
|
+
.1559264637078274
|
141
|
+
.1589608350608804
|
142
|
+
.162029375639111
|
143
|
+
.1651321945016676
|
144
|
+
.16826940018969075
|
145
|
+
.1714411007328226
|
146
|
+
.17464740365558504
|
147
|
+
.17788841598362912
|
148
|
+
.18116424424986022
|
149
|
+
.184474994500441
|
150
|
+
.18782077230067787
|
151
|
+
.19120168274079138
|
152
|
+
.1946178304415758
|
153
|
+
.19806931955994886
|
154
|
+
.20155625379439707
|
155
|
+
.20507873639031693
|
156
|
+
.20863687014525575
|
157
|
+
.21223075741405523
|
158
|
+
.21586050011389926
|
159
|
+
.2195261997292692
|
160
|
+
.2232279573168085
|
161
|
+
.22696587351009836
|
162
|
+
.23074004852434915
|
163
|
+
.23455058216100522
|
164
|
+
.238397573812271
|
165
|
+
.24228112246555486
|
166
|
+
.24620132670783548
|
167
|
+
.25015828472995344
|
168
|
+
.25415209433082675
|
169
|
+
.2581828529215958
|
170
|
+
.26225065752969623
|
171
|
+
.26635560480286247
|
172
|
+
.2704977910130658
|
173
|
+
.27467731206038465
|
174
|
+
.2788942634768104
|
175
|
+
.2831487404299921
|
176
|
+
.2874408377269175
|
177
|
+
.29177064981753587
|
178
|
+
.2961382707983211
|
179
|
+
.3005437944157765
|
180
|
+
.3049873140698863
|
181
|
+
.30946892281750854
|
182
|
+
.31398871337571754
|
183
|
+
.31854677812509186
|
184
|
+
.32314320911295075
|
185
|
+
.3277780980565422
|
186
|
+
.33245153634617935
|
187
|
+
.33716361504833037
|
188
|
+
.3419144249086609
|
189
|
+
.3467040563550296
|
190
|
+
.35153259950043936
|
191
|
+
.3564001441459435
|
192
|
+
.3613067797835095
|
193
|
+
.3662525955988395
|
194
|
+
.3712376804741491
|
195
|
+
.3762621229909065
|
196
|
+
.38132601143253014
|
197
|
+
.386429433787049
|
198
|
+
.39157247774972326
|
199
|
+
.39675523072562685
|
200
|
+
.4019777798321958
|
201
|
+
.4072402119017367
|
202
|
+
.41254261348390375
|
203
|
+
.4178850708481375
|
204
|
+
.4232676699860717
|
205
|
+
.4286904966139066
|
206
|
+
.43415363617474895
|
207
|
+
.4396571738409188
|
208
|
+
.44520119451622786
|
209
|
+
.45078578283822346
|
210
|
+
.45641102318040466
|
211
|
+
.4620769996544071
|
212
|
+
.467783796112159
|
213
|
+
.47353149614800955
|
214
|
+
.4793201831008268
|
215
|
+
.4851499400560704
|
216
|
+
.4910208498478356
|
217
|
+
.4969329950608704
|
218
|
+
.5028864580325687
|
219
|
+
.5088813208549338
|
220
|
+
.5149176653765214
|
221
|
+
.5209955732043543
|
222
|
+
.5271151257058131
|
223
|
+
.5332764040105052
|
224
|
+
.5394794890121072
|
225
|
+
.5457244613701866
|
226
|
+
.5520114015120001
|
227
|
+
.5583403896342679
|
228
|
+
.5647115057049292
|
229
|
+
.5711248294648731
|
230
|
+
.5775804404296506
|
231
|
+
.5840784178911641
|
232
|
+
.5906188409193369
|
233
|
+
.5972017883637634
|
234
|
+
.6038273388553378
|
235
|
+
.6104955708078648
|
236
|
+
.6172065624196511
|
237
|
+
.6239603916750761
|
238
|
+
.6307571363461468
|
239
|
+
.6375968739940326
|
240
|
+
.6444796819705821
|
241
|
+
.6514056374198242
|
242
|
+
.6583748172794485
|
243
|
+
.665387298282272
|
244
|
+
.6724431569576875
|
245
|
+
.6795424696330938
|
246
|
+
.6866853124353135
|
247
|
+
.6938717612919899
|
248
|
+
.7011018919329731
|
249
|
+
.7083757798916868
|
250
|
+
.7156935005064807
|
251
|
+
.7230551289219693
|
252
|
+
.7304607400903537
|
253
|
+
.7379104087727308
|
254
|
+
.7454042095403874
|
255
|
+
.7529422167760779
|
256
|
+
.7605245046752924
|
257
|
+
.768151147247507
|
258
|
+
.7758222183174236
|
259
|
+
.7835377915261935
|
260
|
+
.7912979403326302
|
261
|
+
.799102738014409
|
262
|
+
.8069522576692516
|
263
|
+
.8148465722161012
|
264
|
+
.8227857543962835
|
265
|
+
.8307698767746546
|
266
|
+
.83879901174074
|
267
|
+
.846873231509858
|
268
|
+
.8549926081242338
|
269
|
+
.8631572134541023
|
270
|
+
.8713671191987972
|
271
|
+
.8796223968878317
|
272
|
+
.8879231178819663
|
273
|
+
.8962693533742664
|
274
|
+
.9046611743911496
|
275
|
+
.9130986517934192
|
276
|
+
.9215818562772946
|
277
|
+
.9301108583754237
|
278
|
+
.938685728457888
|
279
|
+
.9473065367331999
|
280
|
+
.9559733532492861
|
281
|
+
.9646862478944651
|
282
|
+
.9734452903984125
|
283
|
+
.9822505503331171
|
284
|
+
.9911020971138298
|
285
|
+
1;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2016 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 "./constants";
|
18
|
+
|
19
|
+
/* All variables are local, so disable pattern checking. */
|
20
|
+
/* stylelint-disable scss/dollar-variable-pattern */
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Calculate the luminance for a color.
|
24
|
+
* See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
25
|
+
*/
|
26
|
+
@function mdc-theme-luminance($color) {
|
27
|
+
$red: nth($mdc-theme-linear-channel-values, red($color) + 1);
|
28
|
+
$green: nth($mdc-theme-linear-channel-values, green($color) + 1);
|
29
|
+
$blue: nth($mdc-theme-linear-channel-values, blue($color) + 1);
|
30
|
+
|
31
|
+
@return .2126 * $red + .7152 * $green + .0722 * $blue;
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Calculate the contrast ratio between two colors.
|
36
|
+
* See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
37
|
+
*/
|
38
|
+
@function mdc-theme-contrast($back, $front) {
|
39
|
+
$backLum: mdc-theme-luminance($back) + .05;
|
40
|
+
$foreLum: mdc-theme-luminance($front) + .05;
|
41
|
+
|
42
|
+
@return max($backLum, $foreLum) / min($backLum, $foreLum);
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Determine whether to use dark or light text on top of given color.
|
47
|
+
* Returns "dark" for dark text and "light" for light text.
|
48
|
+
*/
|
49
|
+
@function mdc-theme-light-or-dark($color) {
|
50
|
+
$minimumContrast: 3.1;
|
51
|
+
|
52
|
+
$lightContrast: mdc-theme-contrast($color, white);
|
53
|
+
$darkContrast: mdc-theme-contrast($color, rgba(black, .87));
|
54
|
+
|
55
|
+
@if ($lightContrast < $minimumContrast) and ($darkContrast > $lightContrast) {
|
56
|
+
@return "dark";
|
57
|
+
}
|
58
|
+
|
59
|
+
@else {
|
60
|
+
@return "light";
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
/* stylelint-enable scss/dollar-variable-pattern */
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2016 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 "./variables";
|
18
|
+
|
19
|
+
/* All variables are local, so disable pattern checking. */
|
20
|
+
/* stylelint-disable scss/dollar-variable-pattern */
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Applies the correct theme color style to the specified property.
|
24
|
+
* $property is typically color or background-color, but can be any CSS property that accepts color values.
|
25
|
+
* $style should be one of the map keys in $mdc-theme-property-values (_variables.scss).
|
26
|
+
*/
|
27
|
+
@mixin mdc-theme-prop($property, $style, $important: false) {
|
28
|
+
@if not map-has-key($mdc-theme-property-values, $style) {
|
29
|
+
@error "Invalid style specified! Choose one of #{map-keys($mdc-theme-property-values)}";
|
30
|
+
}
|
31
|
+
|
32
|
+
@if $important {
|
33
|
+
#{$property}: map-get($mdc-theme-property-values, $style) !important;
|
34
|
+
#{$property}: var(--mdc-theme-#{$style}, map-get($mdc-theme-property-values, $style)) !important;
|
35
|
+
}
|
36
|
+
|
37
|
+
@else {
|
38
|
+
#{$property}: map-get($mdc-theme-property-values, $style);
|
39
|
+
#{$property}: var(--mdc-theme-#{$style}, map-get($mdc-theme-property-values, $style));
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Creates a rule to be used in MDC-Web components for dark theming, and applies the provided contents.
|
45
|
+
* Should provide the $root-selector option if applied to anything other than the root selector.
|
46
|
+
* When used with a modifier class, provide a second argument of `true` for the $compound parameter
|
47
|
+
* to specify that this should be attached as a compound class.
|
48
|
+
*
|
49
|
+
* Usage example:
|
50
|
+
*
|
51
|
+
* ```scss
|
52
|
+
* .mdc-foo {
|
53
|
+
* color: black;
|
54
|
+
*
|
55
|
+
* @include mdc-theme-dark {
|
56
|
+
* color: white;
|
57
|
+
* }
|
58
|
+
*
|
59
|
+
* &__bar {
|
60
|
+
* background: black;
|
61
|
+
*
|
62
|
+
* @include mdc-theme-dark(".mdc-foo") {
|
63
|
+
* background: white;
|
64
|
+
* }
|
65
|
+
* }
|
66
|
+
* }
|
67
|
+
*
|
68
|
+
* .mdc-foo--disabled {
|
69
|
+
* opacity: .38;
|
70
|
+
*
|
71
|
+
* @include mdc-theme-dark(".mdc-foo", true) {
|
72
|
+
* opacity: .5;
|
73
|
+
* }
|
74
|
+
* }
|
75
|
+
* ```
|
76
|
+
*/
|
77
|
+
@mixin mdc-theme-dark($root-selector: null, $compound: false) {
|
78
|
+
@if ($root-selector) {
|
79
|
+
@at-root {
|
80
|
+
@if ($compound) {
|
81
|
+
#{$root-selector}--theme-dark#{&},
|
82
|
+
.mdc-theme--dark & {
|
83
|
+
@content;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
@else {
|
88
|
+
#{$root-selector}--theme-dark &,
|
89
|
+
.mdc-theme--dark & {
|
90
|
+
@content;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
@else {
|
97
|
+
&--theme-dark,
|
98
|
+
.mdc-theme--dark & {
|
99
|
+
@content;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
/* stylelint-enable scss/dollar-variable-pattern */
|