Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array with comma separated arbitrary value classes in JS does not generate as expected #12371

Closed
Oskar-Nilsen-Roos opened this issue Nov 7, 2023 · 1 comment · Fixed by #12396
Assignees

Comments

@Oskar-Nilsen-Roos
Copy link

What version of Tailwind CSS are you using?

v3.3.5

What build tool (or framework if it abstracts the build tool) are you using?

--

What version of Node.js are you using?

--

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/X5qTU0S68S

Describe your issue

Check generated css > utilities in playground link.

Tailwind play link is simplification for a weird issue I ran into when bundling a component library, where I generate styles by looking at the JS files in the project that consumed the library.

When minified, spaces from arrays are removed. e.g.:

["min-w-[17rem]", "max-w-[17rem]"]

turns into

["min-w-[17rem]","max-w-[17rem]"]

Example 1 works as expected, while example 2 does not generate both arbitrary value styles, only the first.

Is this intended behaviour? And is there any way for me to work around it?

Thank you!

@Oskar-Nilsen-Roos Oskar-Nilsen-Roos changed the title Comma separated arbitrary value styles in JS does not generate as expected Array with comma separated arbitrary value classes in JS does not generate as expected Nov 7, 2023
@RobinMalfait RobinMalfait self-assigned this Nov 10, 2023
@RobinMalfait
Copy link
Member

This should be fixed by #12396, and will be available in the next release.

You can already try it by using the insiders build npm install tailwindcss@insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants