-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] arbritary values for row and col classes #15170
Comments
Hey! I think you're looking for |
I think col-[42] and row-[42] already did work in v3: It would be nice if col-42 also worked. Maybe even mapping to |
Wow I swear when I went to test it it didn't but clearly I'm wrong 😅 Will make this work, hilariously I didn't even know you could do this and I'm excited to be able to start writing |
Thanks! Also related to arbitrary values for grid utilities: I use to write |
@subhero24 Ah yeah need to use underscores there, we supported commas for 5 seconds when v3 was first released before switching to underscores because sometimes you need real commas in arbitrary values 👍 |
Hey! Thanks again for your feature request. We're still thinking of adding bare |
Resolves #15170. This PR adds support for bare integer values to the `col-*` and `row-*` utilities: ```css .col-5 { grid-column: 5; } .row-6 { grid-row: 6; } ``` These properties are shorthands for `grid-column-start`/`grid-column-end` and `grid-row-start`/`grid-row-end`, so using a bare integer value ends up being a shortcut for: ```css .col-5 { grid-column-start: 5; grid-column-end: auto; } ``` …which makes these basically work like an alternative to `col-start-*` and `row-start-*`. These support negative values like `-col-6` as well, which also technically extends to arbitrary values like `-col-[6/span_2]` now even though that is a junk value. I've decided not to guard against that though and just consider it user error to keep the implementation simple. --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Co-authored-by: Philipp Spiess <hello@philippspiess.com>
In v4 utilities some utilities like grid-cols-12 and z-40 do not depend on the theme values and just work.
Does that mean that row-42 should also just work? Because it does not work in v4.0.0-beta.2.
I still need the square brackets like row-[42].
The text was updated successfully, but these errors were encountered: