Isn't it a sign of childishness to prefer the expression "win or lose"?
Why Tailwind CSS Won
71–80 of 559 posts
Re: Why Tailwind CSS Won
#72Earlier quoted context omitted.
Now imagine that you want to change the border color to yellow. Would you rather change a single line of CSS, or every single link on all your pages?
ctrl+h Suppose we want to change just one link? Would it be better to make a new class with all the same attributes except the color and apply that to the specific link.
Brittle.
> Suppose we want to change just one link? Would it be better to make a new class with all the same attributes except the color and apply that to the specific link.
Why copy the attributes? Just override the one you want to change. You can even use style="…" if you're sure that it's just one link.
Re: Why Tailwind CSS Won
#73Earlier quoted context omitted.
I can sum up what I like about Tailwind in the following code: ``` (in CSS) a.link { border: red; } a.link:hover { border: blue; } ``` ``` (in Tailwind) ``` It's much easier in Tailwind for me to see locally what's going on with that styling. If I lived in this code all the time, or I was good at structuring CSS, then maybe the first would be more appealing. But I'm a shit at CSS, it always turns into an unmaintainab…
Now imagine that you want to change the border color to yellow. Would you rather change a single line of CSS, or every single link on all your pages?
Then again if your styles are abstracted to a component, your CSS framework is irrelevant!
Re: Why Tailwind CSS Won
#74Earlier quoted context omitted.
> this almost never happens in practice …so let's solve that by making it completely never happen?
Let's not spend extra effort supporting a theoretical feature that won't actually happen.
Re: Why Tailwind CSS Won
#75Re: Why Tailwind CSS Won
#76I don't get Tailwind. In my book, CSS is here to facilitate the style of multiple webpages by modifying a set of rules, and classes are here to mutualise said rules. With Tailwind, it looks like you design by writing HTML, which is the opposite of what CSS aims at. So if you wish to change your design, you'll have to update multiple templates instead of one CSS rule. Every time I've had to work with Tailwind, it felt…
I agree with you. As a developer I like the separation of style and content. We also gain better readability when the code says " 199 " than a long list of tailwind classes. CSS styles are also more reusable across different web sites. I can to some degree see that you can increase re-usability when using shared React components, but then you just create technical debt for those who want to test other frameworks It s…
Re: Why Tailwind CSS Won
#77Earlier quoted context omitted.
I can sum up what I like about Tailwind in the following code: ``` (in CSS) a.link { border: red; } a.link:hover { border: blue; } ``` ``` (in Tailwind) ``` It's much easier in Tailwind for me to see locally what's going on with that styling. If I lived in this code all the time, or I was good at structuring CSS, then maybe the first would be more appealing. But I'm a shit at CSS, it always turns into an unmaintainab…
Now imagine that you want to change the border color to yellow. Would you rather change a single line of CSS, or every single link on all your pages?
Re: Why Tailwind CSS Won
#78Link: https://htmx.org/essays/locality-of-behaviour/
Discussion on HN: https://news.ycombinator.com/item?id=31454886
I personally find it easier to have information spelled out locally at the "call site".
Re: Why Tailwind CSS Won
#79Earlier quoted context omitted.
Now imagine that you want to change the border color to yellow. Would you rather change a single line of CSS, or every single link on all your pages?
Hopefully your link will be a component, so you only need replace one line anyway. Then again if your styles are abstracted to a component, your CSS framework is irrelevant!
Re: Why Tailwind CSS Won
#80Earlier quoted context omitted.
Now imagine that you want to change the border color to yellow. Would you rather change a single line of CSS, or every single link on all your pages?
If you work with components, you don't have this problem. If you don't work with components, good ol' search and replace and it's done.