Skip to content

[v4] Multi theme font sans not works for data theme #15434

Answered by adamwathan
rpiechowicz asked this question in Help
Discussion options

You must be logged in to vote

Hey! Here's a working version of what you're trying to do:

https://play.tailwindcss.com/pFXjFPyhb1?size=540x720&file=css

Key points:

  • Should use @layer theme (although @layer base should work too, but that's a bug you helped me just notice in Tailwind Play)
  • Need to make sure you set font-sans on the same element that has the data attribute, the font won't update otherwise because it's inherited from higher in the tree and the place where it inherits from resolves the CSS variable to a different value (this is just CSS behavior, not Tailwind stuff)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rpiechowicz
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
Converted from issue

This discussion was converted from issue #15431 on December 18, 2024 14:18.