Skip to content

tw: resolve theme() dot-notation in arbitrary values#177

Open
samoht wants to merge 1 commit into
mainfrom
theme-dot-notation
Open

tw: resolve theme() dot-notation in arbitrary values#177
samoht wants to merge 1 commit into
mainfrom
theme-dot-notation

Conversation

@samoht

@samoht samoht commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Tailwind v3-style theme() dot-notation inside an arbitrary value (theme(colors.red.500), theme(colors.red.500/25%), theme(spacing.80)) produced no rule. of_string now resolves the dot-path statically before dispatch - a colour to its oklch value (with /alpha appended, which cascade folds to Tailwind's oklab(...) under canonical comparison), spacing.N to N * 0.25rem - keeping the original theme() spelling as the class-name alias so the utility still round-trips. The gradient class on tailwindcss.com now matches Tailwind under diff=canonical.

theme(colors.red.500), theme(colors.red.500/25%) and theme(spacing.80)
inside an arbitrary value produced no rule. Resolve the dot-path statically
before dispatch - a colour to its oklch (with /alpha appended, which cascade
folds to Tailwind's oklab under canonical comparison), spacing.N to N*0.25rem
- keeping the theme() spelling as the class-name alias so it round-trips.
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.

1 participant