News for hackers. Stuff that matters.
Re:Play with TailwindCSS in the Browser by config_yml on Friday June 10, 2022 @07:40AM (#31692671)
As someone who's been doing CSS for 20 years now, I think Tailwind is an absolute blessing. They've gone a bit crazy with the latest features, but the core of it is so productive to use, especially in teams. Big fan here.
Re:Play with TailwindCSS in the Browser by My90thaccount on Friday June 10, 2022 @08:42AM (#31693257)
Once again, productivity is not the ultimate goal of a profession. Your product is suffering in quality because you are taking shortcuts.
Re:Play with TailwindCSS in the Browser by config_yml on Friday June 10, 2022 @10:12AM (#31694497)
It's not, but it's important. And contrary to what you say, using Tailwind is productive for me AND increases quality. So that's a win for my product.
Re:Play with TailwindCSS in the Browser by kaba0 on Friday June 10, 2022 @10:10AM (#31694470)
Do you have any basis on claiming that the product suffers in quality from using tailwind?
Re:Play with TailwindCSS in the Browser by irrational on Friday June 10, 2022 @08:47AM (#31693320)
> They've gone a bit crazy with the latest features

Can you elaborate? What are the latest features?

Re:Play with TailwindCSS in the Browser by yurishimo on Friday June 10, 2022 @12:47PM (#31696535)
I think they are referring to custom values. As a part of the move to the JIT compiler, it's possible to define arbitrary classes and have Tailwind pick up on it and create a class.

Consider this. `text-red-500` is an out of the box class from TW that gives you a solid red text color. With the new JIT compiler, I can write `text-[#BADA55]` and the compiler is smart enough to generate a class with that hex code as the value for the color. You can use this syntax for almost any available class.

This feature is useful for some cases (marketing sites with finicky pixel perfect requirements) but it can also be abused. It's up to your team to decide where it makes sense to break out of the design system, or if you should add that new value as a token to be reused throughout the app.

Re:Play with TailwindCSS in the Browser by config_yml on Friday June 10, 2022 @10:15AM (#31694522)
Arbitrary Variants looks a bit crazy to me (I haven't used it yet though): https://github.com/tailwindlabs/tailwindcss/pull/8299
Re:Play with TailwindCSS in the Browser by criswell on Friday June 10, 2022 @12:02PM (#31695997)
I know it's going to be abused to hell like everything popular but definitely a useful power tool.

It'll be really nice for container queries when they're ready. Something like: `wider-than-[500px]:hover:text-red-500` and so on.

Also super nice for `:has` (although ordering is a concern at the moment): `[:has(:invalid)]:bg-red-500`.