4 ms·
There are some pretty good tips in this article. Here's one I particularly liked from the Modules section: Only include a selector that includes semantics. A
by misterbwong 15y ago
There are some pretty good tips in this article. Here's one I particularly liked from the Modules section:
Only include a selector that includes semantics. A span or div holds none. A heading has some. A class defined on an element has plenty. [...] The more semantically generic the HTML element (like a span or div), the more likely it will create a conflict down the road. Elements with greater semantics like headings are more likely to appear by themselves within a container and you're more likely able to use an element selector successfully.