0ka3ri / uncanny-page

1 stars 0 forks source link

Content update #26

Closed 0ka3ri closed 5 months ago

0ka3ri commented 5 months ago
0ka3ri commented 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?

mauriciopasquier commented 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.

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.