Remix.run Logo
Retr0id 4 days ago

The neat thing about semantic HTML is that the CSS ought to be pretty interchangeable.

IgorPartola 4 days ago | parent | next [-]

Sure but why would I do that? When was the last time you decided that the solution to whatever problem you were facing was to switch to a completely different CSS framework without rewriting your HTML?

eternityforest 2 days ago | parent | next [-]

For entertainment related stuff where you want really deep themability, a lot of popular frameworks seem to rely too much on non semantic classes that make it hard.

turkey99 3 days ago | parent | prev | next [-]

I’ve had this scenario several times.

The last was when the company I worked for was acquired. We needed to adopt their CSS library for all our applications.

I changed their component based library to have semantic style css and dropped it right in.

giveita 4 days ago | parent | prev [-]

The real neat thing is not having to make decisions up front. But you can tweak it later. If you are a rebel you could even use classes to touch up bits you are not happy with.

IgorPartola 3 days ago | parent [-]

What I am saying is that I have never done this, have seen the need for this, or have heard of anyone doing this or having the need for this.

To create an absurdist analogy it is like saying that because labels on cotton T-shirts are the same size that you could take them off shirt A and sew them onto shirt B. It is possible by there is zero point in doing it other than to say that you did it.

giveita 3 days ago | parent [-]

Correct, there is no need. It is more of a preference, maybe a challenge or code golf type of thing. One advantage is less thinking / decision / boilerplate is needed when adding elements.

Semantic:

p

Normal:

p class=paragraph

Utility:

p class=mx-1 py-1 my-2 text-medium

It is like buying a medium shirt rather than getting a tailor-made t-shirt.

vehemenz 4 days ago | parent | prev [-]

You're mixing "is" and "ought." Why ought styles be interchangeable (remembering that stylesheets and DOM structures often have complex, dependent relationships that are rarely as simple as Pico or anything similar).

Retr0id 4 days ago | parent [-]

I said what I meant to say, I don't understand your reply.