4 ms·
> writing <nav class="nav"> if you can just write <nav> Pure semantic CSS only works if you have a strict html document structure - where eg every h1 is an art
by e12e 3y ago
> writing <nav class="nav"> if you can just write <nav>
Pure semantic CSS only works if you have a strict html document structure - where eg every h1 is an article heading. Any hint of "components" (like an image gallery, navigation menu) become way too fragile with pure CSS because you will be trapped when trying to get the correct specificity.
I agree that class names that match element names is a bit of a smell - but might be forgiven in this particular case, if html nav elements are used in different contexts.