3 ms·
> You skipped "fuck semantic HTML and CSS, we use Tailwind now." If look at Tailwind's website and examples, you'll see that it's one of the very few CSS frame
by dmitriid 4y ago
> You skipped "fuck semantic HTML and CSS, we use Tailwind now."
If look at Tailwind's website and examples, you'll see that it's one of the very few CSS frameworks that properly uses semantic HTML everywhere.
And there's no such thing as "semantic CSS".
- sph 4y agoMost CSS best practices are based around semantic naming: you name your elements ".call_to_action" or ".sidebar". HTML5 introduced a lot of semantic elements such as <header> or <article>. Whereas with Tailwind or HTML < 5 you name you elements based on what they look like. ".font-bold" or "<b>"
- dmitriid 4y agoCSS purists will tell you that you shouldn't tie your CSS to specific structures in your code, and it should be as generic as possible :) > Whereas with Tailwind or HTML < 5 you name you elements based on what they look like. ".font-bold" or "<b>" No, you don't. With Tailwind you use the semantic elements in HTML. And you style them using generic primitives
- dimmke 4y agoSo with the @apply rule you can sketch things out in tailwind and put them behind semantic names if you have PostCSS running. It works quite nicely.
- xigoi 4y ago> And there's no such thing as "semantic CSS". I think the parent meant “[semantic HTML] and CSS”, not “semantic [HTML and CSS]”.