3 ms·
Most CSS best practices are based around semantic naming: you name your elements ".call_to_action" or ".sidebar". HTML5 introduced a lot of semantic elements su
by sph 4y ago
Most 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.