Skip to content

matchUtilities can't handle nested values #11943

Answered by adamwathan
mattiaz9 asked this question in Help
Discussion options

You must be logged in to vote

Hey! I want to improve the ergonomics around this at some point but currently there's no magic in Tailwind to automatically handle nested data structures like that, you need to always pass a flattened object to the values key.

We have a little helper we use internally for doing that with colors that you can import and use in your plugins if you want:

https://play.tailwindcss.com/QxVQQMNiUJ?file=config

Replies: 1 comment 1 reply

Comment options

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

Answer selected by mattiaz9
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 #11942 on September 02, 2023 19:37.