Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Handle `@variant` inside `@custom-variant` ([#18885](https://github.com/tailwindlabs/tailwindcss/pull/18885))
- Merge suggestions when using `@utility` ([#18900](https://github.com/tailwindlabs/tailwindcss/pull/18900))
- Ensure that file system watchers created when using the CLI are always cleaned up ([#18905](https://github.com/tailwindlabs/tailwindcss/pull/18905))
- Do not generate `grid-column` utilities when configuring `grid-column-start` or `grid-column-end` ([#18907](https://github.com/tailwindlabs/tailwindcss/pull/18907))

## [4.1.13] - 2025-09-03

Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ignoredThemeKeyMap = new Map([
'--text-underline-offset',
],
],
['--grid-column', ['--grid-column-start', '--grid-column-end']],
])

function isIgnoredThemeKey(themeKey: ThemeKey, namespace: ThemeKey) {
Expand Down
80 changes: 60 additions & 20 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,9 +1180,28 @@ test('col', async () => {

test('col-start', async () => {
expect(
await run(['col-start-auto', 'col-start-4', 'col-start-99', 'col-start-[123]', '-col-start-4']),
await compileCss(
css`
@theme {
--grid-column-start-custom: 1 column-start;
}
@tailwind utilities;
`,
[
'col-start-auto',
'col-start-4',
'col-start-99',
'col-start-[123]',
'-col-start-4',
'col-start-custom',
],
),
).toMatchInlineSnapshot(`
".-col-start-4 {
":root, :host {
--grid-column-start-custom: 1 column-start;
}

.-col-start-4 {
grid-column-start: calc(4 * -1);
}

Expand All @@ -1200,6 +1219,10 @@ test('col-start', async () => {

.col-start-auto {
grid-column-start: auto;
}

.col-start-custom {
grid-column-start: var(--grid-column-start-custom);
}"
`)
expect(
Expand All @@ -1217,28 +1240,45 @@ test('col-start', async () => {
})

test('col-end', async () => {
expect(await run(['col-end-auto', 'col-end-4', 'col-end-99', 'col-end-[123]', '-col-end-4']))
.toMatchInlineSnapshot(`
".-col-end-4 {
grid-column-end: calc(4 * -1);
}
expect(
await compileCss(
css`
@theme {
--grid-column-end-custom: 1 column-end;
}
@tailwind utilities;
`,
['col-end-auto', 'col-end-4', 'col-end-99', 'col-end-[123]', '-col-end-4', 'col-end-custom'],
),
).toMatchInlineSnapshot(`
":root, :host {
--grid-column-end-custom: 1 column-end;
}

.col-end-4 {
grid-column-end: 4;
}
.-col-end-4 {
grid-column-end: calc(4 * -1);
}

.col-end-99 {
grid-column-end: 99;
}
.col-end-4 {
grid-column-end: 4;
}

.col-end-\\[123\\] {
grid-column-end: 123;
}
.col-end-99 {
grid-column-end: 99;
}

.col-end-auto {
grid-column-end: auto;
}"
`)
.col-end-\\[123\\] {
grid-column-end: 123;
}

.col-end-auto {
grid-column-end: auto;
}

.col-end-custom {
grid-column-end: var(--grid-column-end-custom);
}"
`)
expect(
await run([
'col-end',
Expand Down