Re:Tailwind JIT fails to credit Windi CSS
by speedgoose on Thursday March 25, 2021 @01:24PM
(#26582928)
So we are back in the phase of mixing html and style, which was considered super bad practice just a few years ago. Now we have components frameworks like vue or react so some people argue it's not that bad to mix html and style. How long before we consider things like tailwind as bad practice again?
[ Parent
| on HN ]
Re:Tailwind JIT fails to credit Windi CSS
by nightski on Thursday March 25, 2021 @01:29PM
(#26583006)
The thing is there is no hivemind best practice. It depends on a lot of factors such as team size, project duration, technology stacks, etc... As you may already know being able to spot pros and cons ahead of time and avoiding pitfalls for a specific scenario just comes from experience. So if anyone is uncertain about how to proceed, the only way you can become more comfortable in decisions is to try all the things and learn the nuances of different approaches. Eventually it becomes much more natural and requires less effort.
Re:Tailwind JIT fails to credit Windi CSS
by Chris2048 on Friday March 26, 2021 @01:58AM
(#26589145)
Does this mean never put style strings in html? Whether by style-attr, JS or CSS, that html tree has to get style attributes somehow.
I sort of accepted a similar view, that functionality and presentation should be separate (although base html isn't necessarily representative of either).
Now have a more nuanced view: functionality and presentation don't map strictly to logic (js) and style (CSS) - I think there is such a thing as presentation logic, versus data logic.
Re:Tailwind JIT fails to credit Windi CSS
by sfvisser on Thursday March 25, 2021 @01:27PM
(#26582970)
It was only considered super bad by a subset of people. Usually not the people creating and maintaining web apps.
Re:Tailwind JIT fails to credit Windi CSS
by butt_hugger on Thursday March 25, 2021 @01:45PM
(#26583197)
The "subset of people" known as "good developers." Lately they haven't been creating and maintaining web apps because of things like Tailwind.
Re:Tailwind JIT fails to credit Windi CSS
by sfvisser on Thursday March 25, 2021 @01:50PM
(#26583263)
Pretty sure ‘good developer’ wasn’t the discriminating factor.
This will almost surely happen.
CSS will be extended until it solves the pain points, at which point things will swing in the other direction.
It's just a question of where your abstraction point is. Currently it's in a component. Tomorrow it might move.