Skip to content

Commit 2d88b6f

Browse files
committed
Add items-first-baseline and items-last-baseline utilities - v4
https://developer.mozilla.org/en-US/docs/Web/CSS/align-items#baseline
1 parent 62de02a commit 2d88b6f

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
@@ -1011,6 +1011,8 @@ exports[`getClassList 1`] = `
10111011
"items-baseline",
10121012
"items-center",
10131013
"items-end",
1014+
"items-first-baseline",
1015+
"items-last-baseline",
10141016
"items-start",
10151017
"items-stretch",
10161018
"justify-around",

packages/tailwindcss/src/utilities.test.ts

+21-2
Original file line numberDiff line numberDiff line change
@@ -5332,8 +5332,17 @@ test('align-content', () => {
53325332
})
53335333

53345334
test('items', () => {
5335-
expect(run(['items-start', 'items-end', 'items-center', 'items-baseline', 'items-stretch']))
5336-
.toMatchInlineSnapshot(`
5335+
expect(
5336+
run([
5337+
'items-start',
5338+
'items-end',
5339+
'items-center',
5340+
'items-baseline',
5341+
'items-first-baseline',
5342+
'items-last-baseline',
5343+
'items-stretch',
5344+
]),
5345+
).toMatchInlineSnapshot(`
53375346
".items-baseline {
53385347
align-items: baseline;
53395348
}
@@ -5346,6 +5355,14 @@ test('items', () => {
53465355
align-items: flex-end;
53475356
}
53485357
5358+
.items-first-baseline {
5359+
align-items: baseline;
5360+
}
5361+
5362+
.items-last-baseline {
5363+
align-items: last baseline;
5364+
}
5365+
53495366
.items-start {
53505367
align-items: flex-start;
53515368
}
@@ -5361,6 +5378,8 @@ test('items', () => {
53615378
'-items-end',
53625379
'-items-center',
53635380
'-items-baseline',
5381+
'-items-first-baseline',
5382+
'-items-last-baseline',
53645383
'-items-stretch',
53655384
]),
53665385
).toEqual('')

packages/tailwindcss/src/utilities.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,8 @@ export function createUtilities(theme: Theme) {
19821982
staticUtility('items-start', [['align-items', 'flex-start']])
19831983
staticUtility('items-end', [['align-items', 'flex-end']])
19841984
staticUtility('items-baseline', [['align-items', 'baseline']])
1985+
staticUtility('items-first-baseline', [['align-items', 'first baseline']])
1986+
staticUtility('items-last-baseline', [['align-items', 'last baseline']])
19851987
staticUtility('items-stretch', [['align-items', 'stretch']])
19861988

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

0 commit comments

Comments
 (0)