Add bare value support for auto-rows-* and auto-cols-*#20229
Add bare value support for auto-rows-* and auto-cols-*#20229RobinMalfait wants to merge 4 commits into
auto-rows-* and auto-cols-*#20229Conversation
We expect that `auto-cols-12` and `auto-rows-12` will compile using the spacing scale.
Confidence Score: 5/5Small, self-contained addition that mirrors an established pattern throughout the file; no existing behavior is changed and new utilities silently no-op when Both handlers follow the exact same guard-then-return pattern as No files require special attention. Reviews (2): Last reviewed commit: "use `isValidSpacingMultiplier`" | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR introduces support for bare numeric spacing values in 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
This is more consistent with other places where we use the spacing scale
This PR adds bare value support for
auto-rows-*andauto-cols-*.We first introduced
auto-rows-auto,auto-rows-min,auto-rows-maxandauto-rows-fr(same forauto-cols-*) back in Tailwind CSS v1.9 (https://v1.tailwindcss.com/docs/grid-auto-rows#app) but we haven't touched it since.This PR now adds support for bare values that use the spacing scale. That means that you can now use
auto-rows-12orauto-cols-12which will result in the following CSS:We could also add support for percentage based values. The only question is what the syntax should be. This can either be
auto-rows-3/4orauto-rows-75%.For the fraction case, we already have
w-3/4andaspect-3/4even though they both have a different value as a result:We also have some precedence for the
%value as well, e.g.via-10%for gradient color stops.I think I would personally towards the
auto-rows-75%value instead ofauto-rows-3/4. The fraction syntax works great for aspect ratio because that's literally what it is (aspect-16/9). The fraction also works great for widths, because you typically have 2 elements next to each other:Since you only use the
auto-rows-*once on a parent element, I think theauto-rows-75%makes a bit more sense thanauto-rows-3/4since there is no other element (at least not that I can think of).TODO
auto-rows-3/4auto-rows-75%Percentage support isn't a blocker for this PR, since you can always use
auto-rows-[75%]if you wantTest plan
Requested by: #20225