Skip to content

Remove --tw- variables from universal selector #7317

Answered by adamwathan
vascoeduardo asked this question in Help
Discussion options

You must be logged in to vote

Hey! Try this:

// tailwind.config.js
module.exports = {
  experimental: {
    optimizeUniversalDefaults: true
  }
  // ...
}

We tried to make this strategy the default for v3 but it's not compatible with CSS modules or component-specific styles in Svelte/Vue components so we had to revert to using the universal stuff by default.

We use that option on the tailwindcss.com site though, and as long as you are using Tailwind the recommended way (as just a simple boring global stylesheet without CSS modules or any other scoped styles that cause PostCSS to run multiple times in isolation) you should be good.

Replies: 5 comments 12 replies

Comment options

You must be logged in to vote
6 replies
@adamwathan
Comment options

@AndreasHeintze
Comment options

@mpalpha
Comment options

@wongjn
Comment options

@djmtype
Comment options

Answer selected by vascoeduardo
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@djmtype
Comment options

@Inwerpsel
Comment options

@adamwathan
Comment options

@adamwathan
Comment options

@Inwerpsel
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
9 participants