4 ms·
Performance is penalized too. Since CSS rules are parsed from right to left and you have probably a lot of "li" tags, the rule would be very inefficient. Of cou
by riquito 12y ago
Performance is penalized too. Since CSS rules are parsed from right to left and you have probably a lot of "li" tags, the rule would be very inefficient. Of course this doesn't matter in small pages.
- rimantas 12y agoIt does not matter in any real life pages.
- riquito 12y agoIt did for Trello, to name an example (search for speed in http://blog.trello.com/refining-the-way-we-structure-our-css-at-trello/ http://blog.trello.com/refining-the-way-we-structure-our-css...).
- mthoms 12y agoI was going to ask why that is as it seems counterintuitive at first glance. Instead, I Googled it and found the following (excellent) answer at StackOverflow: http://stackoverflow.com/questions/5797014/why-do-browsers-match-css-selectors-from-right-to-left http://stackoverflow.com/questions/5797014/why-do-browsers-m... I'm just provided the link here in case anyone else was wondering the same thing.