File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828- Prevent invalid arbitrary variant selectors from failing the build ([ #10059 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10059 ) )
2929- Properly handle subtraction followed by a variable ([ #10074 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10074 ) )
3030- Fix missing ` string[] ` in the ` theme.dropShadow ` types ([ #10072 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10072 ) )
31+ - Update list of length units ([ #10100 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10100 ) )
3132
3233### Changed
3334
Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ export function percentage(value) {
7777 return ( value . endsWith ( '%' ) && number ( value . slice ( 0 , - 1 ) ) ) || isCSSFunction ( value )
7878}
7979
80+ // Please refer to MDN when updating this list:
81+ // https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units
82+ // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries#container_query_length_units
8083let lengthUnits = [
8184 'cm' ,
8285 'mm' ,
@@ -90,10 +93,25 @@ let lengthUnits = [
9093 'ch' ,
9194 'rem' ,
9295 'lh' ,
96+ 'rlh' ,
9397 'vw' ,
9498 'vh' ,
9599 'vmin' ,
96100 'vmax' ,
101+ 'vb' ,
102+ 'vi' ,
103+ 'svw' ,
104+ 'svh' ,
105+ 'lvw' ,
106+ 'lvh' ,
107+ 'dvw' ,
108+ 'dvh' ,
109+ 'cqw' ,
110+ 'cqh' ,
111+ 'cqi' ,
112+ 'cqb' ,
113+ 'cqmin' ,
114+ 'cqmax' ,
97115]
98116let lengthUnitsPattern = `(?:${ lengthUnits . join ( '|' ) } )`
99117export function length ( value ) {
Original file line number Diff line number Diff line change 843843.text-\[2\.23rem\] {
844844 font-size : 2.23rem ;
845845}
846+ .text-\[4cqw\] {
847+ font-size : 4cqw ;
848+ }
846849.text-\[length\:var\(--font-size\)\] {
847850 font-size : var (--font-size );
848851}
Original file line number Diff line number Diff line change 284284
285285 < div class ="text-[0] "> </ div >
286286 < div class ="text-[2.23rem] "> </ div >
287+ < div class ="text-[4cqw] "> </ div >
287288 < div class ="text-[length:var(--font-size)] "> </ div >
288289 < div class ="text-[angle:var(--angle)] "> </ div >
289290 < div class ="text-[min(10vh,100px)] "> </ div >
You can’t perform that action at this time.
0 commit comments