@@ -40,22 +40,22 @@ describe('style-macro', () => {
40
40
"@layer _.a, _.b, _.c;
41
41
42
42
@layer _.b {
43
- .Jbs1 :first-child {
43
+ .Jbs11 :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
- .Jbpv1 :first-child {
50
+ .Jbpv11 :first-child {
51
51
margin-top: 0.5rem;
52
52
}
53
53
}
54
54
}
55
55
56
56
"
57
57
` ) ;
58
- expect ( js ) . toMatchInlineSnapshot ( '" Jbs1 Jbpv1 "' ) ;
58
+ expect ( js ) . toMatchInlineSnapshot ( '" Jbs11 Jbpv11 "' ) ;
59
59
} ) ;
60
60
61
61
it ( 'should support self references' , ( ) => {
@@ -69,55 +69,55 @@ describe('style-macro', () => {
69
69
"@layer _.a;
70
70
71
71
@layer _.a {
72
- ._kc1 {
72
+ ._kc11 {
73
73
border-top-width: 2px;
74
74
}
75
75
76
76
77
- .hc1 {
77
+ .hc11 {
78
78
border-bottom-width: 2px;
79
79
}
80
80
81
81
82
- .mCPFGYc1 {
82
+ .mCPFGYc11 {
83
83
border-inline-start-width: var(--m);
84
84
}
85
85
86
86
87
- .lc1 {
87
+ .lc11 {
88
88
border-inline-end-width: 2px;
89
89
}
90
90
91
91
92
- .SMBFGYc1 {
92
+ .SMBFGYc11 {
93
93
padding-inline-start: var(--S);
94
94
}
95
95
96
96
97
- .Rv1 {
97
+ .Rv11 {
98
98
padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
99
99
}
100
100
101
101
102
- .ZjUQgKd1 {
102
+ .ZjUQgKd11 {
103
103
width: calc(200px - var(--m) - var(--S));
104
104
}
105
105
106
106
107
- .-m_-mc1 {
107
+ .-m_-mc11 {
108
108
--m: 2px;
109
109
}
110
110
111
111
112
- .-S_-Sv1 {
112
+ .-S_-Sv11 {
113
113
--S: calc(var(--F, var(--M)) * 3 / 8);
114
114
}
115
115
}
116
116
117
117
"
118
118
` ) ;
119
119
120
- expect ( js ) . toMatchInlineSnapshot ( '" _kc1 hc1 mCPFGYc1 lc1 SMBFGYc1 Rv1 ZjUQgKd1 -m_-mc1 -S_-Sv1 "' ) ;
120
+ expect ( js ) . toMatchInlineSnapshot ( '" _kc11 hc11 mCPFGYc11 lc11 SMBFGYc11 Rv11 ZjUQgKd11 -m_-mc11 -S_-Sv11 "' ) ;
121
121
} ) ;
122
122
123
123
it ( 'should support allowed overrides' , ( ) => {
@@ -134,9 +134,9 @@ describe('style-macro', () => {
134
134
color : 'green-400'
135
135
} ) ;
136
136
137
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" gw1 pg1 "' ) ;
138
- expect ( overrides ) . toMatchInlineSnapshot ( '" g8tmWqb1 pHJ3AUd1 "' ) ;
139
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" g8tmWqb1 pg1 "' ) ;
137
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" gw11 pg11 "' ) ;
138
+ expect ( overrides ) . toMatchInlineSnapshot ( '" g8tmWqb11 pHJ3AUd11 "' ) ;
139
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" g8tmWqb11 pg11 "' ) ;
140
140
} ) ;
141
141
142
142
it ( 'should support allowed overrides for properties that expand into multiple' , ( ) => {
@@ -151,9 +151,9 @@ describe('style-macro', () => {
151
151
translateX : 40
152
152
} ) ;
153
153
154
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" -_7PloMd-B1 __Ya1 "' ) ;
155
- expect ( overrides ) . toMatchInlineSnapshot ( '" -_7PloMd-D1 __Ya1 "' ) ;
156
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" -_7PloMd-D1 __Ya1 "' ) ;
154
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" -_7PloMd-B11 __Ya11 "' ) ;
155
+ expect ( overrides ) . toMatchInlineSnapshot ( '" -_7PloMd-D11 __Ya11 "' ) ;
156
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" -_7PloMd-D11 __Ya11 "' ) ;
157
157
} ) ;
158
158
159
159
it ( 'should support allowed overrides for shorthands' , ( ) => {
@@ -168,9 +168,9 @@ describe('style-macro', () => {
168
168
padding : 40
169
169
} ) ;
170
170
171
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" Tk1 Qk1 Sk1 Rk1 "' ) ;
172
- expect ( overrides ) . toMatchInlineSnapshot ( '" Tm1 Qm1 Sm1 Rm1 "' ) ;
173
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Tm1 Qm1 Sm1 Rm1 "' ) ;
171
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" Tk11 Qk11 Sk11 Rk11 "' ) ;
172
+ expect ( overrides ) . toMatchInlineSnapshot ( '" Tm11 Qm11 Sm11 Rm11 "' ) ;
173
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Tm11 Qm11 Sm11 Rm11 "' ) ;
174
174
} ) ;
175
175
176
176
it ( "should support allowed overrides for values that aren't defined" , ( ) => {
@@ -185,9 +185,9 @@ describe('style-macro', () => {
185
185
minWidth : 32
186
186
} ) ;
187
187
188
- expect ( js ( ) ) . toMatchInlineSnapshot ( '" gE1 "' ) ;
189
- expect ( overrides ) . toMatchInlineSnapshot ( '" Nk1 "' ) ;
190
- expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Nk1 gE1 "' ) ;
188
+ expect ( js ( ) ) . toMatchInlineSnapshot ( '" gE11 "' ) ;
189
+ expect ( overrides ) . toMatchInlineSnapshot ( '" Nk11 "' ) ;
190
+ expect ( js ( { } , overrides ) ) . toMatchInlineSnapshot ( '" Nk11 gE11 "' ) ;
191
191
} ) ;
192
192
193
193
it ( 'should support runtime conditions' , ( ) => {
@@ -208,42 +208,42 @@ describe('style-macro', () => {
208
208
"@layer _.a;
209
209
210
210
@layer _.a {
211
- .gH1 {
211
+ .gH11 {
212
212
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
213
213
}
214
214
215
215
216
- .gF1 {
216
+ .gF11 {
217
217
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
218
218
}
219
219
220
220
221
- .gE1 {
221
+ .gE11 {
222
222
background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
223
223
}
224
224
225
225
226
- .pt1 {
226
+ .pt11 {
227
227
color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
228
228
}
229
229
230
230
231
- .po1 {
231
+ .po11 {
232
232
color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
233
233
}
234
234
235
235
236
- .pm1 {
236
+ .pm11 {
237
237
color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
238
238
}
239
239
}
240
240
241
241
"
242
242
` ) ;
243
243
244
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH1 pt1 "' ) ;
245
- expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF1 po1 "' ) ;
246
- expect ( js ( { isPressed : true } ) ) . toMatchInlineSnapshot ( '" gE1 pm1 "' ) ;
244
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH11 pt11 "' ) ;
245
+ expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF11 po11 "' ) ;
246
+ expect ( js ( { isPressed : true } ) ) . toMatchInlineSnapshot ( '" gE11 pm11 "' ) ;
247
247
} ) ;
248
248
249
249
it ( 'should support nested runtime conditions' , ( ) => {
@@ -262,32 +262,32 @@ describe('style-macro', () => {
262
262
"@layer _.a;
263
263
264
264
@layer _.a {
265
- .gH1 {
265
+ .gH11 {
266
266
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
267
267
}
268
268
269
269
270
- .gF1 {
270
+ .gF11 {
271
271
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
272
272
}
273
273
274
274
275
- .g_h1 {
275
+ .g_h11 {
276
276
background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
277
277
}
278
278
279
279
280
- .g31 {
280
+ .g311 {
281
281
background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
282
282
}
283
283
}
284
284
285
285
"
286
286
` ) ;
287
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH1 "' ) ;
288
- expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF1 "' ) ;
289
- expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" g_h1 "' ) ;
290
- expect ( js ( { isSelected : true , isHovered : true } ) ) . toMatchInlineSnapshot ( '" g31 "' ) ;
287
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" gH11 "' ) ;
288
+ expect ( js ( { isHovered : true } ) ) . toMatchInlineSnapshot ( '" gF11 "' ) ;
289
+ expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" g_h11 "' ) ;
290
+ expect ( js ( { isSelected : true , isHovered : true } ) ) . toMatchInlineSnapshot ( '" g311 "' ) ;
291
291
} ) ;
292
292
293
293
it ( 'should support variant runtime conditions' , ( ) => {
@@ -301,9 +301,9 @@ describe('style-macro', () => {
301
301
}
302
302
} ) ;
303
303
304
- expect ( js ( { variant : 'accent' } ) ) . toMatchInlineSnapshot ( '" gY1 "' ) ;
305
- expect ( js ( { variant : 'primary' } ) ) . toMatchInlineSnapshot ( '" gjQquMe1 "' ) ;
306
- expect ( js ( { variant : 'secondary' } ) ) . toMatchInlineSnapshot ( '" gw1 "' ) ;
304
+ expect ( js ( { variant : 'accent' } ) ) . toMatchInlineSnapshot ( '" gY11 "' ) ;
305
+ expect ( js ( { variant : 'primary' } ) ) . toMatchInlineSnapshot ( '" gjQquMe11 "' ) ;
306
+ expect ( js ( { variant : 'secondary' } ) ) . toMatchInlineSnapshot ( '" gw11 "' ) ;
307
307
} ) ;
308
308
309
309
it ( 'supports runtime conditions nested inside css conditions' , ( ) => {
@@ -321,14 +321,14 @@ describe('style-macro', () => {
321
321
322
322
@layer _.b.l {
323
323
@media (forced-colors: active) {
324
- .plb1 {
324
+ .plb11 {
325
325
color: ButtonText;
326
326
}
327
327
}
328
328
329
329
330
330
@media (forced-colors: active) {
331
- .ple1 {
331
+ .ple11 {
332
332
color: HighlightText;
333
333
}
334
334
}
@@ -337,36 +337,36 @@ describe('style-macro', () => {
337
337
"
338
338
` ) ;
339
339
340
- expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" plb1 "' ) ;
341
- expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" ple1 "' ) ;
340
+ expect ( js ( { } ) ) . toMatchInlineSnapshot ( '" plb11 "' ) ;
341
+ expect ( js ( { isSelected : true } ) ) . toMatchInlineSnapshot ( '" ple11 "' ) ;
342
342
} ) ;
343
343
344
344
it ( 'should expand shorthand properties to longhands' , ( ) => {
345
345
let { js, css} = testStyle ( {
346
346
padding : 24
347
347
} ) ;
348
348
349
- expect ( js ) . toMatchInlineSnapshot ( '" Th1 Qh1 Sh1 Rh1 "' ) ;
349
+ expect ( js ) . toMatchInlineSnapshot ( '" Th11 Qh11 Sh11 Rh11 "' ) ;
350
350
expect ( css ) . toMatchInlineSnapshot ( `
351
351
"@layer _.a;
352
352
353
353
@layer _.a {
354
- .Th1 {
354
+ .Th11 {
355
355
padding-top: 24px;
356
356
}
357
357
358
358
359
- .Qh1 {
359
+ .Qh11 {
360
360
padding-bottom: 24px;
361
361
}
362
362
363
363
364
- .Sh1 {
364
+ .Sh11 {
365
365
padding-inline-start: 24px;
366
366
}
367
367
368
368
369
- .Rh1 {
369
+ .Rh11 {
370
370
padding-inline-end: 24px;
371
371
}
372
372
}
@@ -384,7 +384,7 @@ describe('style-macro', () => {
384
384
"@layer _.a;
385
385
386
386
@layer _.a {
387
- .gpQzfVb1 {
387
+ .gpQzfVb11 {
388
388
background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
389
389
}
390
390
}
@@ -405,7 +405,7 @@ describe('style-macro', () => {
405
405
"@layer _.a;
406
406
407
407
@layer _.a {
408
- .-FUeYm-gE1 {
408
+ .-FUeYm-gE11 {
409
409
--foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
410
410
}
411
411
}
0 commit comments