News for hackers. Stuff that matters.
Re:Tailwind UI by mike1o1 on Wednesday February 26, 2020 @05:59PM (#22428402)
Because I don't want that cognitive overhead of even thinking about what the selector should be. Then what if I have another sub-sub text? Do I make that an h3? An h4? I don't want to have to think about that. I just make it "text-xs" and move on.

I don't even need to move over to my css file at all - I stay within my template and stay within my flow.

It seems crazy and counter-intuitive at first, but I find that it makes me a lot more productive.

Re:Tailwind UI by iCarrot on Thursday February 27, 2020 @01:12AM (#22431007)
Something to consider: semantic HTML helps with accessibility.
Re:Tailwind UI by strokirk on Thursday February 27, 2020 @03:24AM (#22431616)
Yes, but class names doesn't affect the semantics of their tags.
Re:Tailwind UI by danzig13 on Thursday February 27, 2020 @06:30PM (#22439083)
Have to agree. Having to think about the selector makes you think about the structure and make things more semantic.

I have been paralyzed by trying to do things the semantic way before too though. And now no one cares according the markup I venture to look at now and then.

Re:Tailwind UI by pests on Thursday February 27, 2020 @02:48AM (#22431473)
I understand but then why not .card > *:nth-child(1) and then so on down the child list? You could get away with those two selectors to match anything with at least an initial name. No decisions except for the first name.

Some editors like Brackets allows you to edit other files online and handles css specially so you can edit it just by hovering over class names, etc.

Re:Tailwind UI by losvedir on Thursday February 27, 2020 @09:23AM (#22433480)
This sounds very brittle. What if you want to come back in the future and add another section to the component?