Skip to content

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

Closed
@Oskar-Nilsen-Roos

Description

@Oskar-Nilsen-Roos

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions