Whitespace not cleaned up when using arbitrary value [Prettier Plugin] #13839
Unanswered
faseehahmed1
asked this question in
Help
Replies: 1 comment
-
Hey! This isn't something we do right now but maybe something we can think about. The challenge is that what you have there is actually just two separate classes because of the space:
...and you can totally define valid CSS classes with those names: .grid-cols-\[2fr\, {
/* ... */
}
.\35 fr {
/* ... */
} ...so right now the plugin just sees those as two custom classes and sorts them to the beginning of the list. It's technically unsafe to "fix" this on the chance that someone actually does have custom classes defined that could be misinterpreted as an arbitrary value with a space, but at the same time that would be a pretty stupid thing to do so maybe we can clean it up with an option to disable or something. Will talk about it with the team! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
<div className="grid-cols-[2fr,5fr]>
//This works ✅<div className="grid-cols-[2fr, 5fr]>
//This does not work due to blank space before 5fr ❌Can the prettier plugin not remove spaces "within" an arbitrary value?
Beta Was this translation helpful? Give feedback.
All reactions