Closed 0ka3ri closed 5 months ago
I figured it was less code on the html file and cleaner to just add the id to the OH, FATHER OF ALL element and not adding a class to all the specific elements I want to select. So instead of:
<main class="contact>
<h2 class="contact">
&
main .contact {}
h2 .contact {}
I can go:
<html id="contact">
&
#contact main {}
#contact h2 {}
It also makes more sense to me that in the subpages the #id comes before the element, for faster reading. What do you think?
I figured it was less code on the html file and cleaner to just add the id to the OH, FATHER OF ALL element and not adding a class to all the specific elements I want to select.
Well, one of the main reasons for using ids and classes is to create "components" and reuse them, but if you're 100% certain you need this specific css on this specific page I think the page id is ok.
It also makes more sense to me that in the subpages the #id comes before the element, for faster reading. What do you think?
Well, if you had made components wrapped in a <div>
or something, you could have the component class first anyway :thinking:
But it's not wrong.