Skip to content

Commit 5b3098e

Browse files
hbendevRobinMalfait
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 e1c084c commit 5b3098e

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
@@ -4357,6 +4357,8 @@ exports[`getClassList 1`] = `
43574357
"items-baseline",
43584358
"items-center",
43594359
"items-end",
4360+
"items-first-baseline",
4361+
"items-last-baseline",
43604362
"items-start",
43614363
"items-stretch",
43624364
"justify-around",

packages/tailwindcss/src/utilities.test.ts

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

73107310
test('items', async () => {
7311-
expect(await run(['items-start', 'items-end', 'items-center', 'items-baseline', 'items-stretch']))
7312-
.toMatchInlineSnapshot(`
7311+
expect(
7312+
await run([
7313+
'items-start',
7314+
'items-end',
7315+
'items-center',
7316+
'items-baseline',
7317+
'items-first-baseline',
7318+
'items-last-baseline',
7319+
'items-stretch',
7320+
]),
7321+
).toMatchInlineSnapshot(`
73137322
".items-baseline {
73147323
align-items: baseline;
73157324
}
@@ -7322,6 +7331,14 @@ test('items', async () => {
73227331
align-items: flex-end;
73237332
}
73247333
7334+
.items-first-baseline {
7335+
align-items: baseline;
7336+
}
7337+
7338+
.items-last-baseline {
7339+
align-items: last baseline;
7340+
}
7341+
73257342
.items-start {
73267343
align-items: flex-start;
73277344
}
@@ -7337,6 +7354,8 @@ test('items', async () => {
73377354
'-items-end',
73387355
'-items-center',
73397356
'-items-baseline',
7357+
'-items-first-baseline',
7358+
'-items-last-baseline',
73407359
'-items-stretch',
73417360
'items-start/foo',
73427361
'items-end/foo',

packages/tailwindcss/src/utilities.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,8 @@ export function createUtilities(theme: Theme) {
18211821
staticUtility('items-start', [['align-items', 'flex-start']])
18221822
staticUtility('items-end', [['align-items', 'flex-end']])
18231823
staticUtility('items-baseline', [['align-items', 'baseline']])
1824+
staticUtility('items-first-baseline', [['align-items', 'first baseline']])
1825+
staticUtility('items-last-baseline', [['align-items', 'last baseline']])
18241826
staticUtility('items-stretch', [['align-items', 'stretch']])
18251827

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

0 commit comments

Comments
 (0)