Skip to content

Commit

Permalink
add support for CSS Values 4 viewport-relative units (#2775)
Browse files Browse the repository at this point in the history
Co-authored-by: Taras Polovyi <taras.polovyi@grammarly.com>
  • Loading branch information
taraspolovyi and Taras Polovyi committed Apr 3, 2023
1 parent 5ed3ea7 commit 1d2eaa3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/units.js
Expand Up @@ -6,10 +6,18 @@
*/

// units found in http://www.w3.org/TR/css3-values
// and in https://www.w3.org/TR/css-values-4

module.exports = [
'em', 'ex', 'ch', 'rem' // relative lengths
, 'vw', 'vh', 'vmin', 'vmax' // relative viewport-percentage lengths

, 'vw', 'svw', 'lvw', 'dvw' // relative viewport-percentage lengths (including de-facto standard)
, 'vh', 'svh', 'lvh', 'dvh'
, 'vi', 'svi', 'lvi', 'dvi'
, 'vb', 'svb', 'lvb', 'dvb'
, 'vmin', 'svmin', 'lvmin', 'dvmin'
, 'vmax', 'svmax', 'lvmax', 'dvmax'

, 'cm', 'mm', 'in', 'pt', 'pc', 'px' // absolute lengths
, 'deg', 'grad', 'rad', 'turn' // angles
, 's', 'ms' // times
Expand Down

0 comments on commit 1d2eaa3

Please sign in to comment.