summaryrefslogtreecommitdiff
path: root/node_modules/doiuse/data/features/viewport-unit-variants.js
blob: 330df5df41e045e82a6f62ae9aa1c867b5ebd5d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { checkCSSLengthUnits } from '../../utils/util.js';

/**
 * Small, Large, and Dynamic viewport units
 * Viewport units similar to `vw` and `vh` that are based on shown or hidden
 * browser UI states to address shortcomings of the original units. Currently
 * defined as the
 * `sv*` units (`svb`, `svh`, `svi`, `svmax`, `svmin`, `svw`),
 * `lv*` units (`lvb`, `lvh`, `lvi`, `lvmax`, `lvmin`, `lvw`),
 * `dv*` units (`dvb`, `dvh`, `dvi`, `dvmax`, `dvmin`, `dvw`)
 * and the logical `vi`/`vb` units.
 * @see https://caniuse.com/viewport-unit-variants
 * @type {import('../features').Feature}
 */
export default checkCSSLengthUnits(
  /* sv* units */
  'svb',
  'svh',
  'svi',
  'svmax',
  'svmin',
  'svw',

  /* lv* units */
  'lvb',
  'lvh',
  'lvi',
  'lvmax',
  'lvmin',
  'lvw',

  /* dv* units */
  'dvb',
  'dvh',
  'dvi',
  'dvmax',
  'dvmin',
  'dvw',

  /* vi/vb units */
  'vi',
  'vb',
);