Commit 595b88f
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 <[email protected]>
Co-authored-by: Philipp Spiess <[email protected]>
1 parent 66ef77c commit 595b88f
File tree
3 files changed
+33
-2
lines changed- packages/tailwindcss/src
3 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
1089 | 1091 | | |
1090 | 1092 | | |
1091 | 1093 | | |
| |||
1094 | 1096 | | |
1095 | 1097 | | |
1096 | 1098 | | |
1097 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1098 | 1108 | | |
1099 | 1109 | | |
1100 | 1110 | | |
| |||
1213 | 1223 | | |
1214 | 1224 | | |
1215 | 1225 | | |
| 1226 | + | |
| 1227 | + | |
1216 | 1228 | | |
1217 | 1229 | | |
1218 | 1230 | | |
| |||
1221 | 1233 | | |
1222 | 1234 | | |
1223 | 1235 | | |
1224 | | - | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1225 | 1245 | | |
1226 | 1246 | | |
1227 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
654 | 659 | | |
655 | 660 | | |
656 | 661 | | |
| |||
719 | 724 | | |
720 | 725 | | |
721 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
722 | 732 | | |
723 | 733 | | |
724 | 734 | | |
| |||
0 commit comments