Usually I use modernizr to find out the browser abilities. Same time, I use LESS CSS to make my css more readable and maintainable. Common style using LESS nested rules looks like this:
#header {
color: black;
.logo {
width: 300px;
color: rgba(255,255,255,.6);
&:hover { text-decoration: none }
}
}
Then, if I use modernizr style fall-back, I add this text for previous block:
.no-js #header,
.no-rgba #header {
.logo {
color: white;
}
}
So, it looks like I have two branches of code, and every time I need to check another compatability aspect the number of braches will grow. This code is less maintainable, because you have to find all the styles applied to every element, and the benefit we get using nested classes disappears.
The question: is there a way in LESS syntax to include such fall-backs and not starting a new code-branch for .no-js and other .no-smth classes?