stylelint-browser-compat 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/lib/at-rules/at_rules_name_set.js +16 -0
- package/lib/at-rules/collect_features.js +145 -0
- package/lib/at-rules/counter-style/collect_features.js +41 -0
- package/lib/at-rules/counter-style/descriptor_name_set.js +16 -0
- package/lib/at-rules/document/collect_features.js +46 -0
- package/lib/at-rules/document/regexp/collect_features.js +30 -0
- package/lib/at-rules/font-face/__font_type/collect_features.js +79 -0
- package/lib/at-rules/font-face/collect_features.js +67 -0
- package/lib/at-rules/font-face/descriptor_name_set.js +16 -0
- package/lib/at-rules/font-feature-values/at_rules_name_set.js +16 -0
- package/lib/at-rules/font-feature-values/collect_features.js +30 -0
- package/lib/at-rules/keyframes/collect_features.js +29 -0
- package/lib/at-rules/media/collect_features.js +118 -0
- package/lib/at-rules/media/media_feature_name_map.js +8 -0
- package/lib/at-rules/page/collect_features.js +82 -0
- package/lib/at-rules/page/descriptor_name_set.js +16 -0
- package/lib/at-rules/page/size/collect_features.js +55 -0
- package/lib/at-rules/property/collect_features.js +60 -0
- package/lib/at-rules/property/descriptor_name_set.js +16 -0
- package/lib/at-rules/scroll-timeline/collect_features.js +60 -0
- package/lib/at-rules/scroll-timeline/descriptor_name_set.js +16 -0
- package/lib/collect_features.js +69 -0
- package/lib/index.js +5 -0
- package/lib/is_supported.js +75 -0
- package/lib/options.js +20 -0
- package/lib/parse_browserslist_version.js +132 -0
- package/lib/properties/-moz-orient/collect_features.js +61 -0
- package/lib/properties/-moz-user-input/collect_features.js +71 -0
- package/lib/properties/animation-direction/collect_features.js +53 -0
- package/lib/properties/animation-timing-function/collect_features.js +51 -0
- package/lib/properties/appearance/collect_features.js +76 -0
- package/lib/properties/background/background-clip/collect_features.js +59 -0
- package/lib/properties/background/background-origin/collect_features.js +59 -0
- package/lib/properties/background/background-size/collect_features.js +106 -0
- package/lib/properties/background/collect_features.js +104 -0
- package/lib/properties/background/multiple_backgrounds/collect_features.js +39 -0
- package/lib/properties/background-attachment/collect_features.js +70 -0
- package/lib/properties/background-clip/collect_features.js +55 -0
- package/lib/properties/background-image/collect_features.js +133 -0
- package/lib/properties/background-image/svg_images/collect_features.js +58 -0
- package/lib/properties/background-origin/collect_features.js +42 -0
- package/lib/properties/background-position/collect_features.js +117 -0
- package/lib/properties/background-position-x/collect_features.js +36 -0
- package/lib/properties/background-position-y/collect_features.js +36 -0
- package/lib/properties/background-repeat/collect_features.js +102 -0
- package/lib/properties/background-repeat/round_space/collect_features.js +54 -0
- package/lib/properties/background-size/collect_features.js +38 -0
- package/lib/properties/block-size/collect_features.js +77 -0
- package/lib/properties/border-bottom-left-radius/border-bottom-right-radius/collect_features.js +57 -0
- package/lib/properties/border-bottom-left-radius/collect_features.js +57 -0
- package/lib/properties/border-bottom-right-radius/collect_features.js +57 -0
- package/lib/properties/border-radius/collect_features.js +61 -0
- package/lib/properties/border-top-left-radius/collect_features.js +57 -0
- package/lib/properties/border-top-right-radius/collect_features.js +57 -0
- package/lib/properties/box-shadow/collect_features.js +92 -0
- package/lib/properties/box-sizing/collect_features.js +39 -0
- package/lib/properties/caption-side/collect_features.js +38 -0
- package/lib/properties/clear/collect_features.js +38 -0
- package/lib/properties/clip-path/collect_features.js +65 -0
- package/lib/properties/collect_features.js +452 -0
- package/lib/properties/color-scheme/collect_features.js +52 -0
- package/lib/properties/property_name_set.js +16 -0
- package/lib/properties/transition/collect_features.js +33 -0
- package/lib/properties/transition-property/collect_features.js +38 -0
- package/lib/rule.js +125 -0
- package/lib/selectors/__attributes/collect_features.js +44 -0
- package/lib/selectors/__classes/collect_features.js +23 -0
- package/lib/selectors/__combinators/collect_features.js +91 -0
- package/lib/selectors/__ids/collect_features.js +23 -0
- package/lib/selectors/__pseudos/collect_features.js +228 -0
- package/lib/selectors/__pseudos/pseudo_selector_name_set.js +18 -0
- package/lib/selectors/__tags/collect_features.js +48 -0
- package/lib/selectors/__universal/collect_features.js +37 -0
- package/lib/selectors/active/non_a_elements/collect_features.js +38 -0
- package/lib/selectors/after/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/backdrop/dialog/collect_features.js +38 -0
- package/lib/selectors/before/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/collect_features.js +120 -0
- package/lib/selectors/cue/selector_argument/collect_features.js +26 -0
- package/lib/selectors/hostfunction/collect_features.js +26 -0
- package/lib/selectors/hover/collect_features.js +61 -0
- package/lib/selectors/invalid/collect_features.js +39 -0
- package/lib/selectors/marker/animation_and_transition_support/collect_features.js +43 -0
- package/lib/selectors/not/selector_list/collect_features.js +31 -0
- package/lib/selectors/nth-child/of_syntax/collect_features.js +32 -0
- package/lib/selectors/nth-last-child/of_syntax/collect_features.js +32 -0
- package/lib/selectors/valid/collect_features.js +39 -0
- package/lib/types/__function/collect_features.js +187 -0
- package/lib/types/attr/collect_features.js +69 -0
- package/lib/types/attr/type_unit_name_map.js +8 -0
- package/lib/types/calc/collect_features.js +70 -0
- package/lib/types/collect_features.js +139 -0
- package/lib/types/color/__alpha_parameter/collect_features.js +37 -0
- package/lib/types/color/__float_values/collect_features.js +44 -0
- package/lib/types/color/__space_separated_parameters/collect_features.js +37 -0
- package/lib/types/color/rgb_hexadecimal_notation/collect_features.js +42 -0
- package/lib/types/easing-function/steps/jump/collect_features.js +37 -0
- package/lib/types/function_name_map.js +8 -0
- package/lib/types/image/gradient/__linear-gradient/collect_features.js +77 -0
- package/lib/types/image/gradient/__linear-gradient/doubleposition/collect_features.js +43 -0
- package/lib/types/image/gradient/__linear-gradient/interpolation_hints/collect_features.js +42 -0
- package/lib/types/image/gradient/__linear-gradient/to/collect_features.js +39 -0
- package/lib/types/image/gradient/__linear-gradient/unitless_0_angle/collect_features.js +40 -0
- package/lib/types/image/gradient/__radial-gradient/at/collect_features.js +44 -0
- package/lib/types/image/gradient/__radial-gradient/collect_features.js +68 -0
- package/lib/types/image/gradient/__radial-gradient/doubleposition/collect_features.js +47 -0
- package/lib/types/image/gradient/__radial-gradient/interpolation_hints/collect_features.js +42 -0
- package/lib/types/image/gradient/conic-gradient/collect_features.js +48 -0
- package/lib/types/image/gradient/conic-gradient/doubleposition/collect_features.js +43 -0
- package/lib/types/number/scientific_notation/collect_features.js +31 -0
- package/lib/types/unit_name_map.js +8 -0
- package/lib/types/value_name_map.js +8 -0
- package/lib/types.js +5 -0
- package/package.json +75 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
var _postcssValueParser = require("postcss-value-parser");
|
|
9
|
+
|
|
10
|
+
async function collectFeatures({
|
|
11
|
+
nodes,
|
|
12
|
+
parent
|
|
13
|
+
}) {
|
|
14
|
+
var _parent$raws$between;
|
|
15
|
+
|
|
16
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
17
|
+
|
|
18
|
+
if (prop !== 'box-shadow') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const boxShadowList = [[]];
|
|
24
|
+
|
|
25
|
+
for (const node of nodes) {
|
|
26
|
+
if (node.type === 'div' && node.value === ',') {
|
|
27
|
+
boxShadowList.push([]);
|
|
28
|
+
} else {
|
|
29
|
+
const boxShadow = boxShadowList[boxShadowList.length - 1];
|
|
30
|
+
boxShadow === null || boxShadow === void 0 ? void 0 : boxShadow.push(node);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
35
|
+
|
|
36
|
+
if (boxShadowList.length >= 2) {
|
|
37
|
+
const index = offset;
|
|
38
|
+
const endIndex = offset + parent.value.length;
|
|
39
|
+
features.push({
|
|
40
|
+
endIndex,
|
|
41
|
+
id: `properties.box-shadow.multiple_shadows`,
|
|
42
|
+
index,
|
|
43
|
+
name: `Multiple shadows`,
|
|
44
|
+
node: parent
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let hasLengthValue = false;
|
|
49
|
+
|
|
50
|
+
for (const boxShadow of boxShadowList) {
|
|
51
|
+
for (let idx = 0; idx < boxShadow.length; idx++) {
|
|
52
|
+
const first = boxShadow[idx];
|
|
53
|
+
|
|
54
|
+
if ((first === null || first === void 0 ? void 0 : first.type) === 'word' && first.value === 'inset') {
|
|
55
|
+
const index = offset + first.sourceIndex;
|
|
56
|
+
const endIndex = offset + first.sourceEndIndex;
|
|
57
|
+
features.push({
|
|
58
|
+
endIndex,
|
|
59
|
+
id: `properties.box-shadow.inset`,
|
|
60
|
+
index,
|
|
61
|
+
name: `"inset" value specified as box-shadow`,
|
|
62
|
+
node: parent
|
|
63
|
+
});
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (hasLengthValue) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if ((first === null || first === void 0 ? void 0 : first.type) === 'word' && (0, _postcssValueParser.unit)(first.value) !== false) {
|
|
72
|
+
hasLengthValue = true;
|
|
73
|
+
const fourth = boxShadow[idx + 6];
|
|
74
|
+
|
|
75
|
+
if ((fourth === null || fourth === void 0 ? void 0 : fourth.type) === 'word' && (0, _postcssValueParser.unit)(fourth.value) !== false) {
|
|
76
|
+
const index = offset + fourth.sourceIndex;
|
|
77
|
+
const endIndex = offset + fourth.sourceEndIndex;
|
|
78
|
+
features.push({
|
|
79
|
+
endIndex,
|
|
80
|
+
id: `properties.box-shadow.spread_radius`,
|
|
81
|
+
index,
|
|
82
|
+
name: `Spread radius value specified as box-shadow`,
|
|
83
|
+
node: parent
|
|
84
|
+
});
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return features;
|
|
92
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
async function collectFeatures({
|
|
9
|
+
nodes,
|
|
10
|
+
parent
|
|
11
|
+
}) {
|
|
12
|
+
var _parent$raws$between;
|
|
13
|
+
|
|
14
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
15
|
+
|
|
16
|
+
if (prop !== 'box-sizing') {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const features = [];
|
|
21
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
22
|
+
|
|
23
|
+
for (const node of nodes) {
|
|
24
|
+
if (node.type === 'word' && node.value === 'padding-box') {
|
|
25
|
+
const index = offset + node.sourceIndex;
|
|
26
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
27
|
+
features.push({
|
|
28
|
+
endIndex,
|
|
29
|
+
id: `properties.box-sizing.padding-box`,
|
|
30
|
+
index,
|
|
31
|
+
name: `"padding-box" value specified as box-sizing`,
|
|
32
|
+
node: parent
|
|
33
|
+
});
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return features;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
const NON_STANDARD_VALUE_LIST = ['left', 'right', 'top-outside', 'bottom-outside'];
|
|
8
|
+
|
|
9
|
+
async function collectFeatures({
|
|
10
|
+
nodes,
|
|
11
|
+
parent
|
|
12
|
+
}) {
|
|
13
|
+
var _parent$raws$between;
|
|
14
|
+
|
|
15
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
16
|
+
|
|
17
|
+
if (prop !== 'caption-side') {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const features = [];
|
|
22
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
23
|
+
const node = nodes[0];
|
|
24
|
+
|
|
25
|
+
if ((node === null || node === void 0 ? void 0 : node.type) === 'word' && NON_STANDARD_VALUE_LIST.includes(node.value)) {
|
|
26
|
+
const index = offset + node.sourceIndex;
|
|
27
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.caption-side.non_standard_values`,
|
|
31
|
+
index,
|
|
32
|
+
name: `"${node.value}" value specified as caption-side`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return features;
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
const FLOW_RELATIVE_VALUE_LIST = ['inline-start', 'inline-end'];
|
|
8
|
+
|
|
9
|
+
async function collectFeatures({
|
|
10
|
+
nodes,
|
|
11
|
+
parent
|
|
12
|
+
}) {
|
|
13
|
+
var _parent$raws$between;
|
|
14
|
+
|
|
15
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
16
|
+
|
|
17
|
+
if (prop !== 'clear') {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const features = [];
|
|
22
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
23
|
+
const node = nodes[0];
|
|
24
|
+
|
|
25
|
+
if ((node === null || node === void 0 ? void 0 : node.type) === 'word' && FLOW_RELATIVE_VALUE_LIST.includes(node.value)) {
|
|
26
|
+
const index = offset + node.sourceIndex;
|
|
27
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.clear.flow_relative_values`,
|
|
31
|
+
index,
|
|
32
|
+
name: `"${node.value}" value specified as clear`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return features;
|
|
38
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
const BASIC_SHAPE_FUNCTION_NAME_LIST = ['inset', 'circle', 'ellipse', 'polygon', 'path'];
|
|
8
|
+
|
|
9
|
+
async function collectFeatures({
|
|
10
|
+
nodes,
|
|
11
|
+
parent
|
|
12
|
+
}) {
|
|
13
|
+
var _parent$raws$between;
|
|
14
|
+
|
|
15
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
16
|
+
|
|
17
|
+
if (prop !== 'clip-path') {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const features = [];
|
|
22
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
23
|
+
|
|
24
|
+
for (const node of nodes) {
|
|
25
|
+
if (node.type === 'function') {
|
|
26
|
+
if (node.value === 'path') {
|
|
27
|
+
const index = offset + node.sourceIndex;
|
|
28
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
29
|
+
features.push({
|
|
30
|
+
endIndex,
|
|
31
|
+
id: `properties.clip-path.path`,
|
|
32
|
+
index,
|
|
33
|
+
name: `"path()" function specified as clip-path`,
|
|
34
|
+
node: parent
|
|
35
|
+
});
|
|
36
|
+
} else if (BASIC_SHAPE_FUNCTION_NAME_LIST.includes(node.value)) {
|
|
37
|
+
const index = offset + node.sourceIndex;
|
|
38
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
39
|
+
features.push({
|
|
40
|
+
endIndex,
|
|
41
|
+
id: `properties.clip-path.basic_shape`,
|
|
42
|
+
index,
|
|
43
|
+
name: `"${node.value}()" function specified as clip-path`,
|
|
44
|
+
node: parent
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (node.type === 'word') {
|
|
50
|
+
if (node.value === 'fill-box' || node.value === 'stroke-box') {
|
|
51
|
+
const index = offset + node.sourceIndex;
|
|
52
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
53
|
+
features.push({
|
|
54
|
+
endIndex,
|
|
55
|
+
id: `properties.clip-path.fill_and_stroke_box`,
|
|
56
|
+
index,
|
|
57
|
+
name: `"${node.value}" value specified as clip-path`,
|
|
58
|
+
node: parent
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return features;
|
|
65
|
+
}
|