Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support `screens` in JS config files ([#14415](https://github.com/tailwindlabs/tailwindcss/pull/14415))
- Add `bg-radial-*` and `bg-conic-*` utilities for radial and conic gradients ([#14467](https://github.com/tailwindlabs/tailwindcss/pull/14467))
- Add new `shadow-initial` and `inset-shadow-initial` utilities for resetting shadow colors ([#14468](https://github.com/tailwindlabs/tailwindcss/pull/14468))
- Add `field-sizing-*` utilities ([#14469](https://github.com/tailwindlabs/tailwindcss/pull/14469))

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,8 @@ exports[`getClassList 1`] = `
"end-4",
"end-auto",
"end-full",
"field-sizing-content",
"field-sizing-fixed",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing normal

"field-sizing-normal",

"fill-current",
"fill-current/0",
"fill-current/5",
Expand Down
3 changes: 2 additions & 1 deletion packages/tailwindcss/src/property-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ export default [

'box-sizing',
'display',
'aspect-ratio',

'field-sizing',
'aspect-ratio',
'height',
'max-height',
'min-height',
Expand Down
15 changes: 15 additions & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,21 @@ test('display', async () => {
).toEqual('')
})

test('field-sizing', async () => {
expect(await run(['field-sizing-content', 'field-sizing-fixed'])).toMatchInlineSnapshot(`
".field-sizing-content {
field-sizing: content;
}

.field-sizing-fixed {
field-sizing: fixed;
}"
`)
expect(
await run(['field-sizing-[other]', '-field-sizing-content', '-field-sizing-fixed']),
).toEqual('')
})

test('aspect-ratio', async () => {
expect(await run(['aspect-video', 'aspect-[10/9]', 'aspect-4/3'])).toMatchInlineSnapshot(`
".aspect-4\\/3 {
Expand Down
6 changes: 6 additions & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,12 @@ export function createUtilities(theme: Theme) {
staticUtility('contents', [['display', 'contents']])
staticUtility('list-item', [['display', 'list-item']])

/**
* @css `field-sizing`
*/
staticUtility('field-sizing-content', [['field-sizing', 'content']])
staticUtility('field-sizing-fixed', [['field-sizing', 'fixed']])

Comment on lines +889 to +890

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing field-sizing: normal

staticUtility('field-sizing-normal', [['field-sizing', 'normal']])

Copy link
Contributor Author

@thecrypticace thecrypticace Apr 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normal was replaced with content in late 2023 while the spec was still a work in progress

/**
* @css `aspect-ratio`
*/
Expand Down