File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1919 +media(123M)
2020 // @media (max-width: 456px)
2121
22+ +media(123em 456Mem)
23+ // @media (min-width: 123em) and (max-width: 456em)
24+
2225 +media($break480 '(screen)', 300 500M, $landscape)
2326 // @media (min-width: 480px) and (screen), (min-width: 300px) and (max-width: 500px), (orientation: landscape)
2427
2528
2629= media ($breakpoints ...)
30+ $MAX : ' M'
2731 $media : ' '
2832 $disjunctionCount : length($breakpoints )
2933
3539 $literal : nth($conjunction , $j )
3640
3741 @if type- of($literal ) == number
38- $literal : ' (#{if(unit($literal) == ' M' , ' max' , ' min ' )}-width: #{$literal / ($literal * 0 + 1)}px)'
42+ $literalUnit : unit($literal )
43+ $maxMode : str- slice($literalUnit , 0 , str- length($MAX )) == $MAX
44+ $extremum : ' min'
45+
46+ @if $maxMode
47+ $extremum : ' max'
48+ $literalUnit : str- slice($literalUnit , str- length($MAX ) + 1 )
49+
50+ @if $literalUnit == ' '
51+ $literalUnit : ' px'
52+
53+ $literal : ' (#{$extremum}-width: #{$literal / ($literal * 0 + 1)}#{$literalUnit})'
3954
4055 $media : $media + $literal + if($j == $conjunctionCount , ' ' , ' and ' )
4156
You can’t perform that action at this time.
0 commit comments