1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- 'use strict';
- const uniteSets = require('../utils/uniteSets.js');
- const lengthUnits = new Set([
- // Relative length units
- 'em',
- 'ex',
- 'ch',
- 'rem',
- 'rlh',
- 'lh',
- // Viewport-percentage lengths
- 'dvh',
- 'dvmax',
- 'dvmin',
- 'dvw',
- 'lvh',
- 'lvmax',
- 'lvmin',
- 'lvw',
- 'svh',
- 'svmax',
- 'svmin',
- 'svw',
- 'vh',
- 'vw',
- 'vmin',
- 'vmax',
- 'vm',
- // Absolute length units
- 'px',
- 'mm',
- 'cm',
- 'in',
- 'pt',
- 'pc',
- 'q',
- 'mozmm',
- // Flexible length units
- 'fr',
- // Container query units
- 'cqw',
- 'cqh',
- 'cqi',
- 'cqb',
- 'cqmin',
- 'cqmax',
- ]);
- const units = uniteSets(lengthUnits, [
- // Relative length units
- '%',
- // Time length units
- 's',
- 'ms',
- // Angle
- 'deg',
- 'grad',
- 'turn',
- 'rad',
- // Frequency
- 'Hz',
- 'kHz',
- // Resolution
- 'dpi',
- 'dpcm',
- 'dppx',
- ]);
- module.exports = {
- lengthUnits,
- units,
- };
|