less.js
less.js copied to clipboard
Produces invalid media query from nested conditions
To reproduce:
@media (max-width: 500px) {
@media screen {
body {
background-color: red;
}
}
}
Current behavior:
Produces invalid css with and screen at the end of the media query.
@media (max-width: 500px) and screen {
body {
background-color: red;
}
}
Expected behavior:
screen and added to the start of the media query.
@media screen and (max-width: 500px) {
body {
background-color: red;
}
}
Environment information:
http://lesscss.org/less-preview/
Hello , I have solved your problem :
reproduice
@media screen { @media (max-width: 500px) { body { background-color: red; } } }
you just had to reverse "screen" and "(max-width: 500px)"