3 ms·
This might surprise you but most industry web development today is using components powered by a framework, and Tailwind fits in perfectly to the close coupling
by wildrhythms 3y ago
This might surprise you but most industry web development today is using components powered by a framework, and Tailwind fits in perfectly to the close coupling of styles to components.
- Incipient 3y agoBut in components with scoped styling, you're better off just using css directly. Create a class that has all the styles you want, then use it in the HTML - nicely and cleanly separates css and HTML code.
- zztop44 3y agoWhy do you want to separate the CSS and HTML? They’re both style info, especially in component design.
- fjfuvucucuc 3y agoBecause they're not both style info? Html is a markup language, it applies semantic structure to your content, CSS styles html. Classes are a tool for selecting markup to style. Sure, you can create a class for every single CSS rule you write, but just because you can doesn't mean you should.