Skip to content

fix: exclude text-wrap utilities from class conflict detection#140

Merged
liamwalder merged 2 commits intodevelopfrom
fix/text-wrap-properties
Apr 9, 2026
Merged

fix: exclude text-wrap utilities from class conflict detection#140
liamwalder merged 2 commits intodevelopfrom
fix/text-wrap-properties

Conversation

@tristan-mouchet
Copy link
Copy Markdown
Collaborator

@tristan-mouchet tristan-mouchet commented Apr 7, 2026

Summary

Fix text-balance, text-wrap, text-nowrap, and text-pretty being
incorrectly treated as fontSize/color classes, which caused them to
remove existing text-[...] size classes when added via custom classes.

Changes

  • Add textWrap property to CLASS_PROPERTY_MAP for text-(wrap|nowrap|balance|pretty)
  • Exclude text-wrap utilities from fontSize regex pattern
  • Exclude text-wrap utilities from color regex pattern

Test plan

  • Add text-[48px] to a layer, then add text-balance — both should coexist
  • Add text-balance first, then text-[48px] — both should coexist
  • Verify text-wrap, text-nowrap, text-pretty also don't conflict with font size or color classes
  • Verify font size and color conflict detection still works (e.g. adding text-lg still replaces text-[48px])

…lities from fontSize and color regex patterns
@liamwalder liamwalder merged commit f072733 into develop Apr 9, 2026
3 checks passed
@liamwalder liamwalder deleted the fix/text-wrap-properties branch April 9, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"text-balance" removes "text-[48px]" when added in custom classes

2 participants