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,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectFeatures = collectFeatures;
|
|
7
|
+
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
|
|
12
|
+
const REPEAT_SINGLE_KEYWORD_LIST = ['repeat-x', 'repeat-y'];
|
|
13
|
+
const REPEAT_GENERAL_KEYWORD_LIST = ['repeat', 'space', 'round', 'no-repeat'];
|
|
14
|
+
const REPEAT_KEYWORD_LIST = [...REPEAT_SINGLE_KEYWORD_LIST, ...REPEAT_GENERAL_KEYWORD_LIST];
|
|
15
|
+
|
|
16
|
+
async function collectFeatures({
|
|
17
|
+
nodes,
|
|
18
|
+
parent
|
|
19
|
+
}) {
|
|
20
|
+
var _parent$raws$between;
|
|
21
|
+
|
|
22
|
+
const prop = parent.prop.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
23
|
+
|
|
24
|
+
if (prop !== 'background' && prop !== 'background-repeat') {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const promises = [];
|
|
29
|
+
const features = [];
|
|
30
|
+
const bgRepeatList = [[]];
|
|
31
|
+
|
|
32
|
+
for (const node of nodes) {
|
|
33
|
+
if (node.type === 'div' && node.value === ',') {
|
|
34
|
+
bgRepeatList.push([]);
|
|
35
|
+
} else {
|
|
36
|
+
const bgRepeat = bgRepeatList[bgRepeatList.length - 1];
|
|
37
|
+
bgRepeat === null || bgRepeat === void 0 ? void 0 : bgRepeat.push(node);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
42
|
+
|
|
43
|
+
if (bgRepeatList.length >= 2) {
|
|
44
|
+
const index = offset;
|
|
45
|
+
const endIndex = offset + parent.value.length;
|
|
46
|
+
features.push({
|
|
47
|
+
endIndex,
|
|
48
|
+
id: `properties.background-repeat.multiple_backgrounds`,
|
|
49
|
+
index,
|
|
50
|
+
name: `Multiple backgrounds`,
|
|
51
|
+
node: parent
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
for (const bgRepeat of bgRepeatList) {
|
|
56
|
+
for (let idx = 0; idx < bgRepeat.length; idx++) {
|
|
57
|
+
const first = bgRepeat[idx];
|
|
58
|
+
const second = bgRepeat[idx + 2];
|
|
59
|
+
|
|
60
|
+
if ((first === null || first === void 0 ? void 0 : first.type) !== 'word' || !REPEAT_KEYWORD_LIST.includes(first.value)) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!REPEAT_GENERAL_KEYWORD_LIST.includes(first.value)) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if ((second === null || second === void 0 ? void 0 : second.type) === 'word' && REPEAT_GENERAL_KEYWORD_LIST.includes(second.value)) {
|
|
69
|
+
const index = offset + first.sourceIndex;
|
|
70
|
+
const endIndex = offset + second.sourceEndIndex;
|
|
71
|
+
features.push({
|
|
72
|
+
endIndex,
|
|
73
|
+
id: `properties.background-repeat.2-value`,
|
|
74
|
+
index,
|
|
75
|
+
name: `Different values for x & y directions specified as background-repeat`,
|
|
76
|
+
node: parent
|
|
77
|
+
});
|
|
78
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./round_space/collect_features"))).then(({
|
|
79
|
+
collectFeatures
|
|
80
|
+
}) => {
|
|
81
|
+
return collectFeatures({
|
|
82
|
+
nodes: [first, second],
|
|
83
|
+
parent
|
|
84
|
+
});
|
|
85
|
+
}));
|
|
86
|
+
break;
|
|
87
|
+
} else {
|
|
88
|
+
promises.push(Promise.resolve().then(() => _interopRequireWildcard(require("./round_space/collect_features"))).then(({
|
|
89
|
+
collectFeatures
|
|
90
|
+
}) => {
|
|
91
|
+
return collectFeatures({
|
|
92
|
+
nodes: [first],
|
|
93
|
+
parent
|
|
94
|
+
});
|
|
95
|
+
}));
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return [...features, ...(await Promise.all(promises)).flat()];
|
|
102
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 !== 'background' && prop !== 'background-repeat') {
|
|
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') {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (node.value === 'round') {
|
|
29
|
+
const index = offset + node.sourceIndex;
|
|
30
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
31
|
+
features.push({
|
|
32
|
+
endIndex,
|
|
33
|
+
id: `properties.background-repeat.round_space`,
|
|
34
|
+
index,
|
|
35
|
+
name: `"round" value specified as background-repeat`,
|
|
36
|
+
node: parent
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (node.value === 'space') {
|
|
41
|
+
const index = offset + node.sourceIndex;
|
|
42
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
43
|
+
features.push({
|
|
44
|
+
endIndex,
|
|
45
|
+
id: `properties.background-repeat.round_space`,
|
|
46
|
+
index,
|
|
47
|
+
name: `"space" value specified as background-repeat`,
|
|
48
|
+
node: parent
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return features;
|
|
54
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 !== 'background' && prop !== 'background-size') {
|
|
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 === 'contain' || node.value === 'cover')) {
|
|
25
|
+
const index = offset + node.sourceIndex;
|
|
26
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
27
|
+
features.push({
|
|
28
|
+
endIndex,
|
|
29
|
+
id: `properties.background-size.contain_and_cover`,
|
|
30
|
+
index,
|
|
31
|
+
name: `"${node.value}" value specified as background-size`,
|
|
32
|
+
node: parent
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return features;
|
|
38
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 !== 'block-size') {
|
|
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
|
+
const index = offset + node.sourceIndex;
|
|
25
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
26
|
+
|
|
27
|
+
if (node.type === 'word') {
|
|
28
|
+
const value = node.value.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
29
|
+
|
|
30
|
+
if (value === 'fit-content') {
|
|
31
|
+
features.push({
|
|
32
|
+
endIndex,
|
|
33
|
+
id: `properties.block-size.fit-content`,
|
|
34
|
+
index,
|
|
35
|
+
name: `"fit-content" value specified as block-size`,
|
|
36
|
+
node: parent
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (value === 'min-content') {
|
|
41
|
+
features.push({
|
|
42
|
+
endIndex,
|
|
43
|
+
id: `properties.block-size.min-content`,
|
|
44
|
+
index,
|
|
45
|
+
name: `"min-content" value specified as block-size`,
|
|
46
|
+
node: parent
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (value === 'max-content') {
|
|
51
|
+
features.push({
|
|
52
|
+
endIndex,
|
|
53
|
+
id: `properties.block-size.max-content`,
|
|
54
|
+
index,
|
|
55
|
+
name: `"max-content" value specified as block-size`,
|
|
56
|
+
node: parent
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (node.type === 'function') {
|
|
62
|
+
const func = node.value.replace(/^-(webkit|moz|ms|o)-/, '');
|
|
63
|
+
|
|
64
|
+
if (func === 'fit-content') {
|
|
65
|
+
features.push({
|
|
66
|
+
endIndex,
|
|
67
|
+
id: `properties.block-size.fit-content_function`,
|
|
68
|
+
index,
|
|
69
|
+
name: `"fit-content()" function specified as block-size`,
|
|
70
|
+
node: parent
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return features;
|
|
77
|
+
}
|
package/lib/properties/border-bottom-left-radius/border-bottom-right-radius/collect_features.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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 !== 'border-bottom-left-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
|
|
25
|
+
if (nodes.length >= 3) {
|
|
26
|
+
const index = offset;
|
|
27
|
+
const endIndex = offset + parent.value.length;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.border-bottom-left-radius.elliptical_corners`,
|
|
31
|
+
index,
|
|
32
|
+
name: `Elliptical corner by border-bottom-left-radius`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const node of nodes) {
|
|
38
|
+
const index = offset + node.sourceIndex;
|
|
39
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
40
|
+
|
|
41
|
+
if (node.type === 'word') {
|
|
42
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
43
|
+
|
|
44
|
+
if (result !== false && result.unit === '%') {
|
|
45
|
+
features.push({
|
|
46
|
+
endIndex,
|
|
47
|
+
id: `properties.border-bottom-left-radius.percentages`,
|
|
48
|
+
index,
|
|
49
|
+
name: `Percentage value specified as border-bottom-left-radius`,
|
|
50
|
+
node: parent
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return features;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 !== 'border-bottom-left-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
|
|
25
|
+
if (nodes.length >= 3) {
|
|
26
|
+
const index = offset;
|
|
27
|
+
const endIndex = offset + parent.value.length;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.border-bottom-left-radius.elliptical_corners`,
|
|
31
|
+
index,
|
|
32
|
+
name: `Elliptical corner by border-bottom-left-radius`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const node of nodes) {
|
|
38
|
+
const index = offset + node.sourceIndex;
|
|
39
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
40
|
+
|
|
41
|
+
if (node.type === 'word') {
|
|
42
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
43
|
+
|
|
44
|
+
if (result !== false && result.unit === '%') {
|
|
45
|
+
features.push({
|
|
46
|
+
endIndex,
|
|
47
|
+
id: `properties.border-bottom-left-radius.percentages`,
|
|
48
|
+
index,
|
|
49
|
+
name: `Percentage value specified as border-bottom-left-radius`,
|
|
50
|
+
node: parent
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return features;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 !== 'border-bottom-right-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
|
|
25
|
+
if (nodes.length >= 3) {
|
|
26
|
+
const index = offset;
|
|
27
|
+
const endIndex = offset + parent.value.length;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.border-bottom-right-radius.elliptical_corners`,
|
|
31
|
+
index,
|
|
32
|
+
name: `Elliptical corner by border-bottom-right-radius`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const node of nodes) {
|
|
38
|
+
const index = offset + node.sourceIndex;
|
|
39
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
40
|
+
|
|
41
|
+
if (node.type === 'word') {
|
|
42
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
43
|
+
|
|
44
|
+
if (result !== false && result.unit === '%') {
|
|
45
|
+
features.push({
|
|
46
|
+
endIndex,
|
|
47
|
+
id: `properties.border-bottom-right-radius.percentages`,
|
|
48
|
+
index,
|
|
49
|
+
name: `Percentage value specified as border-bottom-right-radius`,
|
|
50
|
+
node: parent
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return features;
|
|
57
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 !== 'border-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
let isEllipticalBorder = false;
|
|
25
|
+
|
|
26
|
+
for (const node of nodes) {
|
|
27
|
+
if (node.type === 'word') {
|
|
28
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
29
|
+
|
|
30
|
+
if (result !== false && result.unit === '%') {
|
|
31
|
+
const index = offset + node.sourceIndex;
|
|
32
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
33
|
+
features.push({
|
|
34
|
+
endIndex,
|
|
35
|
+
id: `properties.border-radius.percentages`,
|
|
36
|
+
index,
|
|
37
|
+
name: `Percentage value specified as border-radius`,
|
|
38
|
+
node: parent
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (node.type === 'div' && node.value === '/') {
|
|
44
|
+
isEllipticalBorder = true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (isEllipticalBorder) {
|
|
49
|
+
const index = offset;
|
|
50
|
+
const endIndex = offset + parent.value.length;
|
|
51
|
+
features.push({
|
|
52
|
+
endIndex,
|
|
53
|
+
id: `properties.border-radius.elliptical_borders`,
|
|
54
|
+
index,
|
|
55
|
+
name: `Elliptical borders by border-radius`,
|
|
56
|
+
node: parent
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return features;
|
|
61
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 !== 'border-top-left-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
|
|
25
|
+
if (nodes.length >= 3) {
|
|
26
|
+
const index = offset;
|
|
27
|
+
const endIndex = offset + parent.value.length;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.border-top-left-radius.elliptical_corners`,
|
|
31
|
+
index,
|
|
32
|
+
name: `Elliptical corner by border-top-left-radius`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const node of nodes) {
|
|
38
|
+
const index = offset + node.sourceIndex;
|
|
39
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
40
|
+
|
|
41
|
+
if (node.type === 'word') {
|
|
42
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
43
|
+
|
|
44
|
+
if (result !== false && result.unit === '%') {
|
|
45
|
+
features.push({
|
|
46
|
+
endIndex,
|
|
47
|
+
id: `properties.border-top-left-radius.percentages`,
|
|
48
|
+
index,
|
|
49
|
+
name: `Percentage value specified as border-top-left-radius`,
|
|
50
|
+
node: parent
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return features;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 !== 'border-top-right-radius') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const features = [];
|
|
23
|
+
const offset = parent.prop.length + (((_parent$raws$between = parent.raws.between) === null || _parent$raws$between === void 0 ? void 0 : _parent$raws$between.length) ?? 0);
|
|
24
|
+
|
|
25
|
+
if (nodes.length >= 3) {
|
|
26
|
+
const index = offset;
|
|
27
|
+
const endIndex = offset + parent.value.length;
|
|
28
|
+
features.push({
|
|
29
|
+
endIndex,
|
|
30
|
+
id: `properties.border-top-right-radius.elliptical_corners`,
|
|
31
|
+
index,
|
|
32
|
+
name: `Elliptical corner by border-top-right-radius`,
|
|
33
|
+
node: parent
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const node of nodes) {
|
|
38
|
+
const index = offset + node.sourceIndex;
|
|
39
|
+
const endIndex = offset + node.sourceEndIndex;
|
|
40
|
+
|
|
41
|
+
if (node.type === 'word') {
|
|
42
|
+
const result = (0, _postcssValueParser.unit)(node.value);
|
|
43
|
+
|
|
44
|
+
if (result !== false && result.unit === '%') {
|
|
45
|
+
features.push({
|
|
46
|
+
endIndex,
|
|
47
|
+
id: `properties.border-top-right-radius.percentages`,
|
|
48
|
+
index,
|
|
49
|
+
name: `Percentage value specified as border-top-right-radius`,
|
|
50
|
+
node: parent
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return features;
|
|
57
|
+
}
|