Skip to content

Tailwind prefix not working with custom data attributes Tailwind @3.4.3 #13798

Discussion options

You must be logged in to vote

As per the documentation:

It’s important to understand that this prefix is added after any variant modifiers. That means that classes with responsive or state modifiers like sm: or hover: will still have the responsive or state modifier first, with your custom prefix appearing after the colon:

<div class="tw-text-lg md:tw-text-xl tw-bg-red-500 hover:tw-bg-blue-500">
  <!-- -->
</div>

See this fixed example of your Tailwind Play.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@michTheBrandofficial
Comment options

Answer selected by michTheBrandofficial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants