/
mediaFeatures.js
69 lines (64 loc) · 1.23 KB
/
mediaFeatures.js
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
'use strict';
const uniteSets = require('../utils/uniteSets.js');
const deprecatedMediaFeatureNames = new Set([
'device-aspect-ratio',
'device-height',
'device-width',
'max-device-aspect-ratio',
'max-device-height',
'max-device-width',
'min-device-aspect-ratio',
'min-device-height',
'min-device-width',
]);
const rangeTypeMediaFeatureNames = new Set([
'aspect-ratio',
'color-index',
'color',
'height',
'monochrome',
'resolution',
'width',
]);
const mediaFeatureNames = uniteSets(deprecatedMediaFeatureNames, rangeTypeMediaFeatureNames, [
'any-hover',
'any-pointer',
'color-gamut',
'display-mode',
'dynamic-range',
'forced-colors',
'grid',
'hover',
'inverted-colors',
'light-level',
'max-aspect-ratio',
'max-color',
'max-color-index',
'max-height',
'max-monochrome',
'max-resolution',
'max-width',
'min-aspect-ratio',
'min-color',
'min-color-index',
'min-height',
'min-monochrome',
'min-resolution',
'min-width',
'orientation',
'overflow-block',
'overflow-inline',
'pointer',
'prefers-color-scheme',
'prefers-contrast',
'prefers-reduced-motion',
'prefers-reduced-transparency',
'scan',
'scripting',
'update',
'video-dynamic-range',
]);
module.exports = {
rangeTypeMediaFeatureNames,
mediaFeatureNames,
};