Skip to content
Open
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 @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Sort `min-*`, `max-*`, and container query variants with decimal values numerically (e.g. `min-[40.25rem]` before `min-[40.5rem]`) ([#20512](https://github.com/tailwindlabs/tailwindcss/pull/20512))
- Ensure CSS comments ending with `\*/` are closed correctly instead of swallowing the CSS that follows (e.g. `/* C:\temp\*/`) ([#20508](https://github.com/tailwindlabs/tailwindcss/pull/20508))
- Improve style invalidation performance of `group-*` and `peer-*` variants ([#20513](https://github.com/tailwindlabs/tailwindcss/pull/20513))
- Treat viewport units like `dvmin` and `svi` and font-relative units like `cap` and `rex` as lengths in arbitrary values (e.g. `text-[10dvmin]` generates `font-size` instead of `color`) ([#20516](https://github.com/tailwindlabs/tailwindcss/pull/20516))

## [4.3.3] - 2026-07-16

Expand Down
28 changes: 28 additions & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26917,6 +26917,34 @@ test('text', async () => {
).toEqual('')
})

test('text with viewport and font-relative length units', async () => {
let units = [
'cap',
'ic',
'rex',
'rch',
'rcap',
'ric',
'svi',
'svb',
'svmin',
'svmax',
'lvi',
'lvb',
'lvmin',
'lvmax',
'dvi',
'dvb',
'dvmin',
'dvmax',
]
for (let unit of units) {
expect(await run([`text-[1${unit}]`])).toEqual(
`\n.text-\\[1${unit}\\] {\n font-size: 1${unit};\n}\n`,
)
}
})

test('text-shadow', async () => {
expect(
await run(
Expand Down
18 changes: 18 additions & 0 deletions packages/tailwindcss/src/utils/infer-data-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ const LENGTH_UNITS = [
'em',
'ex',
'ch',
'cap',
'ic',
'rem',
'rex',
'rch',
'rcap',
'ric',
'lh',
'rlh',
'vw',
Expand All @@ -219,10 +225,22 @@ const LENGTH_UNITS = [
'vi',
'svw',
'svh',
'svi',
'svb',
'svmin',
'svmax',
'lvw',
'lvh',
'lvi',
'lvb',
'lvmin',
'lvmax',
'dvw',
'dvh',
'dvi',
'dvb',
'dvmin',
'dvmax',
'cqw',
'cqh',
'cqi',
Expand Down