CSS pre-processor with a possibility to define variables in a @media query
问题 Currently, I am using LESS as my main CSS pre-processor. I have (and I am sure a lot of people have this need) to define variables in a @media query like: @media screen and (max-width: 479px) { myVar: 10px; } @media screen and (min-width: 480px) and (max-width: 767px) { myVar: 20px; } @media screen and (min-width: 768px) { myVar: 30px; } .myElement { padding: @myVar; } This doesn't work in LESS, because of the compiling nature ( @myVar is defined within a scope of each particular @media only,