Hacker News new | past | comments | ask | show | jobs | submit login

For large/complex sites, you should take into consideration the performance of various selectors. ID selectors are always fastest, and single classes are faster than complex selectors.

Nested rules in LESS/SASS make things easier to manage, but when you end up using extend blocks, nested files, and parent rules, you can end up with very non-performant CSS rules. It may not matter much in a small page, but on larger pages with thousands of DOM nodes it can add up.




Unless you're just nesting the ever-loving shit out of your pre-processor, there is almost always lower hanging fruit when it comes to performance.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: