Stylus 用关键字替换长的@media 行
Stylus replace long @media line with a keyword
是否可以在 Stylus 中定义要使用的 keyword/variable 而不是长的 @media 行规则?
例如:
IE = @media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm)
然后用作
.div1
IE
color red
是的,像这样:
IE = 'all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm)'
.div1
@media IE
color red
是否可以在 Stylus 中定义要使用的 keyword/variable 而不是长的 @media 行规则?
例如:
IE = @media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm)
然后用作
.div1
IE
color red
是的,像这样:
IE = 'all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm)'
.div1
@media IE
color red