Skip to content
Discussion options

You must be logged in to vote

The warning appears because Tailwind CSS IntelliSense detects a CSS conflict.

Both utilities set the same property:

  • text-balancetext-wrap: balance
  • text-prettytext-wrap: pretty

Since they target the same CSS property, the extension assumes one will override the other and reports a cssConflict.

Your fallback idea is valid though: text-pretty is not fully supported in Firefox yet, so using text-balance as a fallback makes sense.

A cleaner way to implement this without triggering the conflict warning is to use a supports variant so the utilities don’t apply at the same time:

<div class="text-balance supports-[text-wrap:pretty]:text-pretty"></div>

This works as follows:

  • text-balance i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HovSyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants