3 ms·
> Tailwind excels in the case where you need a style "just for this one spot" because you don't have to create a classname and edit two different files (html an
by pphysch 3y ago
> Tailwind excels in the case where you need a style "just for this one spot" because you don't have to create a classname and edit two different files (html and css) to achieve the effect.
Inline style attributes and <style> blocks already solve this...
I suspect most of the mania around CSS frameworks is that people don't grok that you don't HAVE to put everything in one big external .css file -- there is a spectrum of ways to declare CSS and with modern browser dev tools it becomes easy to understand where each rule is coming from.
- steveklabnik 3y ago> Inline style attributes and <style> blocks already solve this... Sure. The point of tailwind is to make this nicer, not to fully replace it. I find the naming scheme and helpers they provide to make writing CSS a lot easier. Mind you, I would never claim to be a CSS expert in the first place. But Tailwind isn't trying to be something different, it's trying to make something easier and better. I like vim too. I feel like there's a vague similarity here.
- threatofrain 3y agoI would argue that Tailwind's job is to basically fully replace everything if done idealistically. You want the ability to focus on a single component without thinking that there's CSS somewhere else.
- steveklabnik 3y agoI do agree that it's best practice to always use only the tailwind classes, I guess what I mean is, it's not like it makes it impossible to use just CSS. It is, in my mind, a nicer way to write CSS, that brings some of its own advantages, but it's not like, fancy magic. It is CSS, fundamentally, not something else.