Skip to content

calc() in arbitrary class name missing spaces around - #18288

Closed
@wongjn

Description

@wongjn

What version of Tailwind CSS are you using?

v4.1.9

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

Tailwind Play

What version of Node.js are you using?

N/a

What browser are you using?

Chrome, Firefox

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/VL4wmKtq0r

Describe your issue

Seems like work in #18220 may have introduced some regressions in whitespace handling in calc().

For w-[calc(100%-var(--foo))], we get:

width: calc(100%-var(--foo));

But I would expect:

width: calc(100% - var(--foo));

Source: https://discord.com/channels/486935104384532500/1382440930182828104

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