Nested selectors performance impact and LESS

Compi

New Member
I have been reading for the past 1.5 hours about this and still couldn't find a concise and decisive answer.As far as I understood browsers parse CSS selectors from right to left.That means a long CSS selector such as this:\[code\].card .container .businesscard .pinfo li.pinfo-box span:first-child\[/code\]is one of the least efficient lines of code to ever appear here in SO.First of all, am I right on this one?Secondly, I am designing a rich UI using LESS, which ultimately produces this kind of mammoth selectors out of the nested designs I am coding.What can be done to avoid this kind of selectors? Rely on classes and IDs alone? But then again what is the purpose of using LESS if you can't write nested CSS?Your input is appreciated.
 
Back
Top