feat: support fraction widths like 1/2 and 12/12 - #475
Merged
Conversation
Typing a fraction like 1/2 in the width setting previously produced an invalid arbitrary class (w-[1/2]). Fractions now map to native Tailwind utilities (w-1/2, min-w-5/12), and whole fractions like 12/12 normalize to the full keyword (w-full) since Tailwind no longer ships n/n classes.
ysamcode
requested review from
liamwalder,
lunenas and
tristan-mouchet
as code owners
July 28, 2026 06:28
MCP instructions and the design reference did not mention fraction widths, so agents had no way to discover them. Also add common width fractions to the class autocomplete suggestions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow entering Tailwind fraction values (
1/12…12/12) in the width and other sizing inputs. Fractions map to native Tailwind utilities likew-1/2, and whole fractions like12/12convert tow-fullsince Tailwind no longer shipsn/nclasses.Changes
1/2→w-1/2,5/12→min-w-5/12) instead of invalid arbitrary classes (w-[1/2])12/12,6/6) to thefullkeyword (w-full)w-1/2,w-1/3,w-2/3,w-1/4,w-3/4) to class autocomplete suggestionsTest plan
1/2in the width input — layer getsw-1/2and renders at 50% width12/12in the width input — layer getsw-fulland the input reads back100%5/12in min/max width or height inputs — native fraction classes are generated100%,320,50%,fit,auto) still convert as beforew-1/2and friends