Skip to content

Commit 39966b2

Browse files
hbendevphilipp-spiess
authored andcommitted
Add items-first-baseline and items-last-baseline utilities - v4
https://developer.mozilla.org/en-US/docs/Web/CSS/align-items#baseline
1 parent 4489493 commit 39966b2

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap

+2
Original file line numberDiff line numberDiff line change
@@ -4877,6 +4877,8 @@ exports[`getClassList 1`] = `
48774877
"items-baseline",
48784878
"items-center",
48794879
"items-end",
4880+
"items-first-baseline",
4881+
"items-last-baseline",
48804882
"items-start",
48814883
"items-stretch",
48824884
"justify-around",

packages/tailwindcss/src/utilities.test.ts

+21-2
Original file line numberDiff line numberDiff line change
@@ -7312,8 +7312,17 @@ test('align-content', async () => {
73127312
})
73137313

73147314
test('items', async () => {
7315-
expect(await run(['items-start', 'items-end', 'items-center', 'items-baseline', 'items-stretch']))
7316-
.toMatchInlineSnapshot(`
7315+
expect(
7316+
await run([
7317+
'items-start',
7318+
'items-end',
7319+
'items-center',
7320+
'items-baseline',
7321+
'items-first-baseline',
7322+
'items-last-baseline',
7323+
'items-stretch',
7324+
]),
7325+
).toMatchInlineSnapshot(`
73177326
".items-baseline {
73187327
align-items: baseline;
73197328
}
@@ -7326,6 +7335,14 @@ test('items', async () => {
73267335
align-items: flex-end;
73277336
}
73287337
7338+
.items-first-baseline {
7339+
align-items: baseline;
7340+
}
7341+
7342+
.items-last-baseline {
7343+
align-items: last baseline;
7344+
}
7345+
73297346
.items-start {
73307347
align-items: flex-start;
73317348
}
@@ -7341,6 +7358,8 @@ test('items', async () => {
73417358
'-items-end',
73427359
'-items-center',
73437360
'-items-baseline',
7361+
'-items-first-baseline',
7362+
'-items-last-baseline',
73447363
'-items-stretch',
73457364
'items-start/foo',
73467365
'items-end/foo',

packages/tailwindcss/src/utilities.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,8 @@ export function createUtilities(theme: Theme) {
18751875
staticUtility('items-start', [['align-items', 'flex-start']])
18761876
staticUtility('items-end', [['align-items', 'flex-end']])
18771877
staticUtility('items-baseline', [['align-items', 'baseline']])
1878+
staticUtility('items-first-baseline', [['align-items', 'first baseline']])
1879+
staticUtility('items-last-baseline', [['align-items', 'last baseline']])
18781880
staticUtility('items-stretch', [['align-items', 'stretch']])
18791881

18801882
staticUtility('justify-normal', [['justify-content', 'normal']])

0 commit comments

Comments
 (0)