Array properties in config #12064
Replies: 3 comments
-
I believe the array syntax works by coincidence and is not officially supported, hence why you get the typing error and why there is no documentation. |
Beta Was this translation helpful? Give feedback.
-
Wouldn't it be great to add simple support for fallbacks? Or document this approach if it's implemented and works as expected? |
Beta Was this translation helpful? Give feedback.
-
It may already be outdated, but I came across the question you mentioned on StackOverflow and collected my thoughts. I won't duplicate it here, so I'll just leave the link: Tailwind CSS fallback for new screen length types such as "lvh", "svh" |
Beta Was this translation helpful? Give feedback.
-
I was trying to use the new
dvh
unit but wanted to include a fallback in case it wasn't supported in a browser and came across this StackOverflow thread that suggested I add the following to my config:which worked and generated the correct CSS:
However since I am using typescript for my config, I am getting a type error that "Type 'string[]' is not assignable to type 'string'".
I could not find anything about this in the documentation (I apologize if I missed it), but since this is working it would be beneficial to update the types to reflect and support this behaviour.
Beta Was this translation helpful? Give feedback.
All reactions