Skip to content

Conversation

@Dunqing
Copy link
Contributor

@Dunqing Dunqing commented Dec 24, 2025

When tailwindPreserveWhitespace is true, the whitespace should be kept as is anyway, so return false early to avoid unnecessary checking.

@Dunqing Dunqing force-pushed the improve-canCollapseWhitespaceIn branch from 93c7993 to 8d68d0c Compare December 24, 2025 08:10
The CSS tests fail and removing this means we’ll need to do this check in 9 separate places so centralizing it is simpler.

Though some of those places don’t appear to be tested right now meaning we’re missing some necessary test coverage.
@thecrypticace thecrypticace merged commit c0f1a9e into tailwindlabs:main Dec 24, 2025
1 check passed
@thecrypticace
Copy link
Contributor

I tweaked this one a bit. I brought back the check inside sortClasses as it's simpler to do it in a single place (at least for now) and it's necessary to handle CSS formatting properly.

Skipping the unnecessary path traversal is a good idea though — thanks!

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 this pull request may close these issues.

2 participants