Post

Little Tailwind tip — instead of trying merge classes and manage conflicts with `!important`, style things based on data or ARIA attributes and just handle everything declaratively with CSS:

12 reposts174 likes

Curiosity... What is gained by using the tip's approach and what is lost by not using the tip ? I just changed a chunk of code so that I the "!" approach is no longer needed, but I am curious about this tip. Thank you

`aria-checked`, `aria-disabled`, `aria-expanded`, `aria-hidden`, `aria-invalid`, `aria-pressed`, `aria-selected` carry state information. If you use them, then adding `data-*` is redundant.