Is it possible to use @source inline across multiple lines? #19460
-
|
I’m currently safelisting all border-color utilities using:
This works as expected. However, Prettier automatically reformats it to: After this change, Tailwind throws the error:
From a user perspective, safelisting all colors for a single utility feels like a reasonable and common use case. There doesn’t seem to be a shorthand for “all colors,” so the inline pattern approach makes sense here. Allowing @source inline to span multiple lines also feels like valid (and more readable) syntax, especially for longer patterns like this. Right now, the only way I’ve found to keep things readable is to split the safelist into multiple @source inline(...) calls, each covering a subset of colors—but that quickly becomes verbose and harder to maintain. Is multiline usage of @source inline expected to work, or is this a limitation of the current parser? If it’s intentional, is there a recommended way to handle large safelists like this while keeping the config readable and formatter-friendly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Made PR #19461 to allow this 👍 |
Beta Was this translation helpful? Give feedback.
Made PR #19461 to allow this 👍