@@ -1180,9 +1180,28 @@ test('col', async () => {
1180
1180
1181
1181
test('col-start', async () => {
1182
1182
expect(
1183
- await run(['col-start-auto', 'col-start-4', 'col-start-99', 'col-start-[123]', '-col-start-4']),
1183
+ await compileCss(
1184
+ css`
1185
+ @theme {
1186
+ --grid-column-start-custom: 1 column-start;
1187
+ }
1188
+ @tailwind utilities;
1189
+ `,
1190
+ [
1191
+ 'col-start-auto',
1192
+ 'col-start-4',
1193
+ 'col-start-99',
1194
+ 'col-start-[123]',
1195
+ '-col-start-4',
1196
+ 'col-start-custom',
1197
+ ],
1198
+ ),
1184
1199
).toMatchInlineSnapshot(`
1185
- ".-col-start-4 {
1200
+ ":root, :host {
1201
+ --grid-column-start-custom: 1 column-start;
1202
+ }
1203
+
1204
+ .-col-start-4 {
1186
1205
grid-column-start: calc(4 * -1);
1187
1206
}
1188
1207
@@ -1200,6 +1219,10 @@ test('col-start', async () => {
1200
1219
1201
1220
.col-start-auto {
1202
1221
grid-column-start: auto;
1222
+ }
1223
+
1224
+ .col-start-custom {
1225
+ grid-column-start: var(--grid-column-start-custom);
1203
1226
}"
1204
1227
`)
1205
1228
expect(
@@ -1217,28 +1240,45 @@ test('col-start', async () => {
1217
1240
})
1218
1241
1219
1242
test('col-end', async () => {
1220
- expect(await run(['col-end-auto', 'col-end-4', 'col-end-99', 'col-end-[123]', '-col-end-4']))
1221
- .toMatchInlineSnapshot(`
1222
- ".-col-end-4 {
1223
- grid-column-end: calc(4 * -1);
1224
- }
1243
+ expect(
1244
+ await compileCss(
1245
+ css`
1246
+ @theme {
1247
+ --grid-column-end-custom: 1 column-end;
1248
+ }
1249
+ @tailwind utilities;
1250
+ `,
1251
+ ['col-end-auto', 'col-end-4', 'col-end-99', 'col-end-[123]', '-col-end-4', 'col-end-custom'],
1252
+ ),
1253
+ ).toMatchInlineSnapshot(`
1254
+ ":root, :host {
1255
+ --grid-column-end-custom: 1 column-end;
1256
+ }
1225
1257
1226
- . col-end-4 {
1227
- grid-column-end: 4 ;
1228
- }
1258
+ .- col-end-4 {
1259
+ grid-column-end: calc(4 * -1) ;
1260
+ }
1229
1261
1230
- .col-end-99 {
1231
- grid-column-end: 99 ;
1232
- }
1262
+ .col-end-4 {
1263
+ grid-column-end: 4 ;
1264
+ }
1233
1265
1234
- .col-end-\\[123\\] {
1235
- grid-column-end: 123 ;
1236
- }
1266
+ .col-end-99 {
1267
+ grid-column-end: 99 ;
1268
+ }
1237
1269
1238
- .col-end-auto {
1239
- grid-column-end: auto;
1240
- }"
1241
- `)
1270
+ .col-end-\\[123\\] {
1271
+ grid-column-end: 123;
1272
+ }
1273
+
1274
+ .col-end-auto {
1275
+ grid-column-end: auto;
1276
+ }
1277
+
1278
+ .col-end-custom {
1279
+ grid-column-end: var(--grid-column-end-custom);
1280
+ }"
1281
+ `)
1242
1282
expect(
1243
1283
await run([
1244
1284
'col-end',
@@ -1317,9 +1357,28 @@ test('row', async () => {
1317
1357
1318
1358
test('row-start', async () => {
1319
1359
expect(
1320
- await run(['row-start-auto', 'row-start-4', 'row-start-99', 'row-start-[123]', '-row-start-4']),
1360
+ await compileCss(
1361
+ css`
1362
+ @theme {
1363
+ --grid-row-start-custom: 1 row-start;
1364
+ }
1365
+ @tailwind utilities;
1366
+ `,
1367
+ [
1368
+ 'row-start-auto',
1369
+ 'row-start-4',
1370
+ 'row-start-99',
1371
+ 'row-start-[123]',
1372
+ '-row-start-4',
1373
+ 'row-start-custom',
1374
+ ],
1375
+ ),
1321
1376
).toMatchInlineSnapshot(`
1322
- ".-row-start-4 {
1377
+ ":root, :host {
1378
+ --grid-row-start-custom: 1 row-start;
1379
+ }
1380
+
1381
+ .-row-start-4 {
1323
1382
grid-row-start: calc(4 * -1);
1324
1383
}
1325
1384
@@ -1337,6 +1396,10 @@ test('row-start', async () => {
1337
1396
1338
1397
.row-start-auto {
1339
1398
grid-row-start: auto;
1399
+ }
1400
+
1401
+ .row-start-custom {
1402
+ grid-row-start: var(--grid-row-start-custom);
1340
1403
}"
1341
1404
`)
1342
1405
expect(
@@ -1354,28 +1417,45 @@ test('row-start', async () => {
1354
1417
})
1355
1418
1356
1419
test('row-end', async () => {
1357
- expect(await run(['row-end-auto', 'row-end-4', 'row-end-99', 'row-end-[123]', '-row-end-4']))
1358
- .toMatchInlineSnapshot(`
1359
- ".-row-end-4 {
1360
- grid-row-end: calc(4 * -1);
1361
- }
1420
+ expect(
1421
+ await compileCss(
1422
+ css`
1423
+ @theme {
1424
+ --grid-row-end-custom: 1 row-end;
1425
+ }
1426
+ @tailwind utilities;
1427
+ `,
1428
+ ['row-end-auto', 'row-end-4', 'row-end-99', 'row-end-[123]', '-row-end-4', 'row-end-custom'],
1429
+ ),
1430
+ ).toMatchInlineSnapshot(`
1431
+ ":root, :host {
1432
+ --grid-row-end-custom: 1 row-end;
1433
+ }
1362
1434
1363
- . row-end-4 {
1364
- grid-row-end: 4 ;
1365
- }
1435
+ .- row-end-4 {
1436
+ grid-row-end: calc(4 * -1) ;
1437
+ }
1366
1438
1367
- .row-end-99 {
1368
- grid-row-end: 99 ;
1369
- }
1439
+ .row-end-4 {
1440
+ grid-row-end: 4 ;
1441
+ }
1370
1442
1371
- .row-end-\\[123\\] {
1372
- grid-row-end: 123 ;
1373
- }
1443
+ .row-end-99 {
1444
+ grid-row-end: 99 ;
1445
+ }
1374
1446
1375
- .row-end-auto {
1376
- grid-row-end: auto;
1377
- }"
1378
- `)
1447
+ .row-end-\\[123\\] {
1448
+ grid-row-end: 123;
1449
+ }
1450
+
1451
+ .row-end-auto {
1452
+ grid-row-end: auto;
1453
+ }
1454
+
1455
+ .row-end-custom {
1456
+ grid-row-end: var(--grid-row-end-custom);
1457
+ }"
1458
+ `)
1379
1459
expect(
1380
1460
await run([
1381
1461
'row-end',
0 commit comments