3 ms·
Of course. Nesting is just a tool that helps organize your classes. I've found the most maintainable code comes from a well-defined combination of nesting and p
by crazygringo 13y ago
Of course. Nesting is just a tool that helps organize your classes. I've found the most maintainable code comes from a well-defined combination of nesting and prefixes (but I tend to use nesting as a default, and prefixes only when necessary) -- they both have their strengths and weaknesses.
But CSS precedence is always a problem, if it's not specificity then it's ordering instead, the problem doesn't go away by using prefixes. But using the order that rules are defined in can often be more difficult to track/maintain than using specificity to do the same. Good commenting practice is key in both cases. Nesting with mixins certainly isn't always the answer, but it often provides a much cleaner, more maintainable, more intuitive approach to resolving occasional "specificity wars" than not using them.