Recognize missing viewport and font-relative length units
This commit is contained in:
parent
fa81d697fe
commit
1170cd76e5
3 changed files with 42 additions and 0 deletions
|
|
@ -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`) ([#XXXXX](https://github.com/tailwindlabs/tailwindcss/pull/XXXXX))
|
||||
|
||||
## [4.3.3] - 2026-07-16
|
||||
|
||||
|
|
|
|||
|
|
@ -26917,6 +26917,29 @@ test('text', async () => {
|
|||
).toEqual('')
|
||||
})
|
||||
|
||||
test('text with viewport and font-relative length units', async () => {
|
||||
expect(await run(['text-[1cap]', 'text-[1rex]', 'text-[1svi]', 'text-[1dvmin]']))
|
||||
.toMatchInlineSnapshot(`
|
||||
"
|
||||
.text-\\[1cap\\] {
|
||||
font-size: 1cap;
|
||||
}
|
||||
|
||||
.text-\\[1dvmin\\] {
|
||||
font-size: 1dvmin;
|
||||
}
|
||||
|
||||
.text-\\[1rex\\] {
|
||||
font-size: 1rex;
|
||||
}
|
||||
|
||||
.text-\\[1svi\\] {
|
||||
font-size: 1svi;
|
||||
}
|
||||
"
|
||||
`)
|
||||
})
|
||||
|
||||
test('text-shadow', async () => {
|
||||
expect(
|
||||
await run(
|
||||
|
|
|
|||
|
|
@ -208,7 +208,13 @@ const LENGTH_UNITS = [
|
|||
'em',
|
||||
'ex',
|
||||
'ch',
|
||||
'cap',
|
||||
'ic',
|
||||
'rem',
|
||||
'rex',
|
||||
'rch',
|
||||
'rcap',
|
||||
'ric',
|
||||
'lh',
|
||||
'rlh',
|
||||
'vw',
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue