3 ms·
> They've gone a bit crazy with the latest features Can you elaborate? What are the latest features?
by irrational 4y ago
> They've gone a bit crazy with the latest features
Can you elaborate? What are the latest features?
- config_yml 4y agoArbitrary Variants looks a bit crazy to me (I haven't used it yet though): https://github.com/tailwindlabs/tailwindcss/pull/8299 https://github.com/tailwindlabs/tailwindcss/pull/8299
- criswell 4y agoI 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`.
- yurishimo 4y agoI 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.