@@ -40,22 +40,22 @@ describe('style-macro', () => {
40
40
"@layer _.a, _.b, _.c;
41
41
42
42
@layer _.b {
43
- .Jbs :first-child {
43
+ .Jbs8 :first-child {
44
44
margin-top: 0.25rem;
45
45
}
46
46
}
47
47
48
48
@layer _.c.p {
49
49
@media (min-width: 64rem) {
50
- .Jbpv :first-child {
50
+ .Jbpv8 :first-child {
51
51
margin-top: 0.5rem;
52
52
}
53
53
}
54
54
}
55
55
56
56
"
57
57
` ) ;
58
- expect ( js ) . toMatchInlineSnapshot ( '" Jbs Jbpv "' ) ;
58
+ expect ( js ) . toMatchInlineSnapshot ( '" Jbs8 Jbpv8 "' ) ;
59
59
} ) ;
60
60
61
61
it ( 'should support self references' , ( ) => {
@@ -69,47 +69,47 @@ describe('style-macro', () => {
69
69
"@layer _.a;
70
70
71
71
@layer _.a {
72
- ._kc {
72
+ ._kc8 {
73
73
border-top-width: 2px;
74
74
}
75
75
76
76
77
- .hc {
77
+ .hc8 {
78
78
border-bottom-width: 2px;
79
79
}
80
80
81
81
82
- .mCPFGYc {
82
+ .mCPFGYc8 {
83
83
border-inline-start-width: var(--m);
84
84
}
85
85
86
86
87
- .lc {
87
+ .lc8 {
88
88
border-inline-end-width: 2px;
89
89
}
90
90
91
91
92
- .SMBFGYc {
92
+ .SMBFGYc8 {
93
93
padding-inline-start: var(--S);
94
94
}
95
95
96
96
97
- .Rv {
97
+ .Rv8 {
98
98
padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
99
99
}
100
100
101
101
102
- .ZjUQgKd {
102
+ .ZjUQgKd8 {
103
103
width: calc(200px - var(--m) - var(--S));
104
104
}
105
105
106
106
107
- .-m_-mc {
107
+ .-m_-mc8 {
108
108
--m: 2px;
109
109
}
110
110
111
111
112
- .-S_-Sv {
112
+ .-S_-Sv8 {
113
113
--S: calc(var(--F, var(--M)) * 3 / 8);
114
114
}
115
115
}
@@ -118,7 +118,7 @@ describe('style-macro', () => {
118
118
` ) ;
119
119
120
120
expect ( js ) . toMatchInlineSnapshot (
121
- '" _kc hc mCPFGYc lc SMBFGYc Rv ZjUQgKd -m_-mc -S_-Sv "'
121
+ '" _kc8 hc8 mCPFGYc8 lc8 SMBFGYc8 Rv8 ZjUQgKd8 -m_-mc8 -S_-Sv8 "'
122
122
) ;
123
123
} ) ;
124
124
@@ -136,9 +136,9 @@ describe('style-macro', () => {
136
136
color : 'green-400'
137
137
} ) ;
138
138
139
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" gw pg "' ) ;
140
- expect ( overrides ) . toMatchInlineSnapshot ( '" g8tmWqb pHJ3AUd "' ) ;
141
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" g8tmWqb pg "' ) ;
139
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" gw8 pg8 "' ) ;
140
+ expect ( overrides ) . toMatchInlineSnapshot ( '" g8tmWqb8 pHJ3AUd8 "' ) ;
141
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" g8tmWqb8 pg8 "' ) ;
142
142
} ) ;
143
143
144
144
it ( 'should support allowed overrides for properties that expand into multiple' , ( ) => {
@@ -153,9 +153,9 @@ describe('style-macro', () => {
153
153
translateX : 40
154
154
} ) ;
155
155
156
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" -_7PloMd-B __Ya "' ) ;
157
- expect ( overrides ) . toMatchInlineSnapshot ( '" -_7PloMd-D __Ya "' ) ;
158
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" -_7PloMd-D __Ya "' ) ;
156
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" -_7PloMd-B8 __Ya8 "' ) ;
157
+ expect ( overrides ) . toMatchInlineSnapshot ( '" -_7PloMd-D8 __Ya8 "' ) ;
158
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" -_7PloMd-D8 __Ya8 "' ) ;
159
159
} ) ;
160
160
161
161
it ( 'should support allowed overrides for shorthands' , ( ) => {
@@ -170,9 +170,9 @@ describe('style-macro', () => {
170
170
padding : 40
171
171
} ) ;
172
172
173
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" Tk Qk Sk Rk "' ) ;
174
- expect ( overrides ) . toMatchInlineSnapshot ( '" Tm Qm Sm Rm "' ) ;
175
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Tm Qm Sm Rm "' ) ;
173
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" Tk8 Qk8 Sk8 Rk8 "' ) ;
174
+ expect ( overrides ) . toMatchInlineSnapshot ( '" Tm8 Qm8 Sm8 Rm8 "' ) ;
175
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Tm8 Qm8 Sm8 Rm8 "' ) ;
176
176
} ) ;
177
177
178
178
it ( "should support allowed overrides for values that aren't defined" , ( ) => {
@@ -187,9 +187,9 @@ describe('style-macro', () => {
187
187
minWidth : 32
188
188
} ) ;
189
189
190
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" gE "' ) ;
191
- expect ( overrides ) . toMatchInlineSnapshot ( '" Nk "' ) ;
192
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Nk gE "' ) ;
190
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" gE8 "' ) ;
191
+ expect ( overrides ) . toMatchInlineSnapshot ( '" Nk8 "' ) ;
192
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Nk8 gE8 "' ) ;
193
193
} ) ;
194
194
195
195
it ( 'should support runtime conditions' , ( ) => {
@@ -210,42 +210,42 @@ describe('style-macro', () => {
210
210
"@layer _.a;
211
211
212
212
@layer _.a {
213
- .gH {
213
+ .gH8 {
214
214
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
215
215
}
216
216
217
217
218
- .gF {
218
+ .gF8 {
219
219
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
220
220
}
221
221
222
222
223
- .gE {
223
+ .gE8 {
224
224
background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
225
225
}
226
226
227
227
228
- .pt {
228
+ .pt8 {
229
229
color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
230
230
}
231
231
232
232
233
- .po {
233
+ .po8 {
234
234
color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
235
235
}
236
236
237
237
238
- .pm {
238
+ .pm8 {
239
239
color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
240
240
}
241
241
}
242
242
243
243
"
244
244
` ) ;
245
245
246
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH pt "' ) ;
247
- expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF po "' ) ;
248
- expect ( js ( { isPressed : true } ) ) . toMatchInlineSnapshot ( '" gE pm "' ) ;
246
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH8 pt8 "' ) ;
247
+ expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF8 po8 "' ) ;
248
+ expect ( js ( { isPressed : true } ) ) . toMatchInlineSnapshot ( '" gE8 pm8 "' ) ;
249
249
} ) ;
250
250
251
251
it ( 'should support nested runtime conditions' , ( ) => {
@@ -264,33 +264,33 @@ describe('style-macro', () => {
264
264
"@layer _.a;
265
265
266
266
@layer _.a {
267
- .gH {
267
+ .gH8 {
268
268
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
269
269
}
270
270
271
271
272
- .gF {
272
+ .gF8 {
273
273
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
274
274
}
275
275
276
276
277
- .g_h {
277
+ .g_h8 {
278
278
background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
279
279
}
280
280
281
281
282
- .g3 {
282
+ .g38 {
283
283
background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
284
284
}
285
285
}
286
286
287
287
"
288
288
` ) ;
289
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH "' ) ;
290
- expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF "' ) ;
291
- expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" g_h "' ) ;
289
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH8 "' ) ;
290
+ expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF8 "' ) ;
291
+ expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" g_h8 "' ) ;
292
292
expect ( js ( { isSelected : true , isHovered : true } ) ) . toMatchInlineSnapshot (
293
- '" g3 "'
293
+ '" g38 "'
294
294
) ;
295
295
} ) ;
296
296
@@ -305,9 +305,9 @@ describe('style-macro', () => {
305
305
}
306
306
} ) ;
307
307
308
- expect ( js ( { variant : 'accent' } ) ) . toMatchInlineSnapshot ( '" gY "' ) ;
309
- expect ( js ( { variant : 'primary' } ) ) . toMatchInlineSnapshot ( '" gjQquMe "' ) ;
310
- expect ( js ( { variant : 'secondary' } ) ) . toMatchInlineSnapshot ( '" gw "' ) ;
308
+ expect ( js ( { variant : 'accent' } ) ) . toMatchInlineSnapshot ( '" gY8 "' ) ;
309
+ expect ( js ( { variant : 'primary' } ) ) . toMatchInlineSnapshot ( '" gjQquMe8 "' ) ;
310
+ expect ( js ( { variant : 'secondary' } ) ) . toMatchInlineSnapshot ( '" gw8 "' ) ;
311
311
} ) ;
312
312
313
313
it ( 'supports runtime conditions nested inside css conditions' , ( ) => {
@@ -325,14 +325,14 @@ describe('style-macro', () => {
325
325
326
326
@layer _.b.l {
327
327
@media (forced-colors: active) {
328
- .plb {
328
+ .plb8 {
329
329
color: ButtonText;
330
330
}
331
331
}
332
332
333
333
334
334
@media (forced-colors: active) {
335
- .ple {
335
+ .ple8 {
336
336
color: HighlightText;
337
337
}
338
338
}
@@ -341,36 +341,36 @@ describe('style-macro', () => {
341
341
"
342
342
` ) ;
343
343
344
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" plb "' ) ;
345
- expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" ple "' ) ;
344
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" plb8 "' ) ;
345
+ expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" ple8 "' ) ;
346
346
} ) ;
347
347
348
348
it ( 'should expand shorthand properties to longhands' , ( ) => {
349
349
let { js, css} = testStyle ( {
350
350
padding : 24
351
351
} ) ;
352
352
353
- expect ( js ) . toMatchInlineSnapshot ( '" Th Qh Sh Rh "' ) ;
353
+ expect ( js ) . toMatchInlineSnapshot ( '" Th8 Qh8 Sh8 Rh8 "' ) ;
354
354
expect ( css ) . toMatchInlineSnapshot ( `
355
355
"@layer _.a;
356
356
357
357
@layer _.a {
358
- .Th {
358
+ .Th8 {
359
359
padding-top: 24px;
360
360
}
361
361
362
362
363
- .Qh {
363
+ .Qh8 {
364
364
padding-bottom: 24px;
365
365
}
366
366
367
367
368
- .Sh {
368
+ .Sh8 {
369
369
padding-inline-start: 24px;
370
370
}
371
371
372
372
373
- .Rh {
373
+ .Rh8 {
374
374
padding-inline-end: 24px;
375
375
}
376
376
}
@@ -388,7 +388,7 @@ describe('style-macro', () => {
388
388
"@layer _.a;
389
389
390
390
@layer _.a {
391
- .gpQzfVb {
391
+ .gpQzfVb8 {
392
392
background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
393
393
}
394
394
}
@@ -409,7 +409,7 @@ describe('style-macro', () => {
409
409
"@layer _.a;
410
410
411
411
@layer _.a {
412
- .-FUeYm-gE {
412
+ .-FUeYm-gE8 {
413
413
--foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
414
414
}
415
415
}
0 commit comments