Styling Vue components using TailwindCSS Custom Variants

preview_player
Показать описание
In this video I'll show my new favorite tailwind css feature: TailwindCSS custom variants.

You can use custom variants to define your own custom selector modifiers. Paired with a couple of data attributes, this trick will do wonders when styling your vue components!

Рекомендации по теме
Комментарии
Автор

WOW! Thanks for this. I have always found conditionally styles can get messy with Tailwind. This looks like the perfect solution.

ttncmok
Автор

This is really great. A problem solver.

pradeepspace
Автор

Hello Constantin, this video was a real eye opener! Thanks a lot for this!!
On your website, I notice you replaced the usage of `[data-${variant}=true], &` with, &`.
I've searched for references to that in CSS & tailwind repo for the syntax, but can't find anything related to that, care to explain what it does and how it differs from the previous.

esirei
join shbcf.ru