3 ms·
I usually just base it on whether or not an element is a direct child of some other element. For example, the header of the page itself will usually have a dif
by yellowapple 10y ago
I usually just base it on whether or not an element is a direct child of some other element. For example, the header of the page itself will usually have a different style than the header of an article or aside or something, so I can use CSS' child selectors for that.
This often does indeed result in a bowl of spaghetti, but said bowl is in CSS rather than HTML. Things like SASS/SCSS help tremendously.