File tree 3 files changed +41
-0
lines changed
3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -2382,6 +2382,20 @@ exports[`getVariants 1`] = `
2382
2382
" selectors" : [Function ],
2383
2383
" values" : [],
2384
2384
} ,
2385
+ {
2386
+ " hasDash" : true ,
2387
+ " isArbitrary" : false ,
2388
+ " name" : " transparency-safe" ,
2389
+ " selectors" : [Function ],
2390
+ " values" : [],
2391
+ } ,
2392
+ {
2393
+ " hasDash" : true ,
2394
+ " isArbitrary" : false ,
2395
+ " name" : " transparency-reduce" ,
2396
+ " selectors" : [Function ],
2397
+ " values" : [],
2398
+ } ,
2385
2399
{
2386
2400
" hasDash" : true ,
2387
2401
" isArbitrary" : false ,
Original file line number Diff line number Diff line change @@ -1516,6 +1516,26 @@ test('landscape', () => {
1516
1516
` )
1517
1517
} )
1518
1518
1519
+ test ( 'transparency-safe' , ( ) => {
1520
+ expect ( run ( [ 'transparency-safe:flex' ] ) ) . toMatchInlineSnapshot ( `
1521
+ "@media (prefers-reduced-transparency: no-preference) {
1522
+ .transparency-safe\\:flex {
1523
+ display: flex;
1524
+ }
1525
+ }"
1526
+ ` )
1527
+ } )
1528
+
1529
+ test ( 'transparency-reduce' , ( ) => {
1530
+ expect ( run ( [ 'transparency-reduce:flex' ] ) ) . toMatchInlineSnapshot ( `
1531
+ "@media (prefers-reduced-transparency: reduce) {
1532
+ .transparency-reduce\\:flex {
1533
+ display: flex;
1534
+ }
1535
+ }"
1536
+ ` )
1537
+ } )
1538
+
1519
1539
test ( 'contrast-more' , ( ) => {
1520
1540
expect ( run ( [ 'contrast-more:flex' ] ) ) . toMatchInlineSnapshot ( `
1521
1541
"@media (prefers-contrast: more) {
Original file line number Diff line number Diff line change @@ -690,6 +690,13 @@ export function createVariants(theme: Theme): Variants {
690
690
staticVariant ( 'portrait' , [ '@media (orientation: portrait)' ] , { compounds : false } )
691
691
staticVariant ( 'landscape' , [ '@media (orientation: landscape)' ] , { compounds : false } )
692
692
693
+ staticVariant ( 'transparency-safe' , [ '@media (prefers-reduced-transparency: no-preference)' ] , {
694
+ compounds : false ,
695
+ } )
696
+ staticVariant ( 'transparency-reduce' , [ '@media (prefers-reduced-transparency: reduce)' ] , {
697
+ compounds : false ,
698
+ } )
699
+
693
700
staticVariant ( 'ltr' , [ '&:where([dir="ltr"], [dir="ltr"] *)' ] )
694
701
staticVariant ( 'rtl' , [ '&:where([dir="rtl"], [dir="rtl"] *)' ] )
695
702
You can’t perform that action at this time.
0 commit comments