autoprefixer 9.8.7 → 10.0.2
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/CHANGELOG.md +999 -0
- package/README.md +0 -3
- package/bin/autoprefixer +11 -11
- package/data/prefixes.js +799 -545
- package/lib/at-rule.js +23 -50
- package/lib/autoprefixer.js +108 -97
- package/lib/brackets.js +31 -44
- package/lib/browsers.js +54 -71
- package/lib/declaration.js +122 -178
- package/lib/hacks/align-content.js +24 -54
- package/lib/hacks/align-items.js +23 -53
- package/lib/hacks/align-self.js +32 -60
- package/lib/hacks/animation.js +11 -29
- package/lib/hacks/appearance.js +19 -35
- package/lib/hacks/backdrop-filter.js +16 -31
- package/lib/hacks/background-clip.js +19 -36
- package/lib/hacks/background-size.js +16 -31
- package/lib/hacks/block-logical.js +28 -36
- package/lib/hacks/border-image.js +9 -27
- package/lib/hacks/border-radius.js +22 -44
- package/lib/hacks/break-props.js +38 -51
- package/lib/hacks/color-adjust.js +11 -30
- package/lib/hacks/cross-fade.js +29 -48
- package/lib/hacks/display-flex.js +32 -61
- package/lib/hacks/display-grid.js +12 -32
- package/lib/hacks/filter-value.js +8 -25
- package/lib/hacks/filter.js +13 -27
- package/lib/hacks/flex-basis.js +21 -54
- package/lib/hacks/flex-direction.js +41 -77
- package/lib/hacks/flex-flow.js +33 -61
- package/lib/hacks/flex-grow.js +16 -43
- package/lib/hacks/flex-shrink.js +21 -54
- package/lib/hacks/flex-spec.js +7 -10
- package/lib/hacks/flex-wrap.js +11 -32
- package/lib/hacks/flex.js +27 -58
- package/lib/hacks/fullscreen.js +10 -30
- package/lib/hacks/gradient.js +240 -330
- package/lib/hacks/grid-area.js +25 -43
- package/lib/hacks/grid-column-align.js +14 -34
- package/lib/hacks/grid-end.js +30 -45
- package/lib/hacks/grid-row-align.js +14 -34
- package/lib/hacks/grid-row-column.js +20 -39
- package/lib/hacks/grid-rows-columns.js +75 -99
- package/lib/hacks/grid-start.js +17 -39
- package/lib/hacks/grid-template-areas.js +59 -76
- package/lib/hacks/grid-template.js +40 -61
- package/lib/hacks/grid-utils.js +686 -716
- package/lib/hacks/image-rendering.js +24 -47
- package/lib/hacks/image-set.js +10 -30
- package/lib/hacks/inline-logical.js +26 -32
- package/lib/hacks/intrinsic.js +40 -53
- package/lib/hacks/justify-content.js +26 -57
- package/lib/hacks/mask-border.js +28 -36
- package/lib/hacks/mask-composite.js +41 -57
- package/lib/hacks/order.js +22 -52
- package/lib/hacks/overscroll-behavior.js +16 -37
- package/lib/hacks/pixelated.js +16 -40
- package/lib/hacks/place-self.js +18 -41
- package/lib/hacks/placeholder-shown.js +9 -28
- package/lib/hacks/placeholder.js +15 -38
- package/lib/hacks/text-decoration-skip-ink.js +14 -29
- package/lib/hacks/text-decoration.js +20 -31
- package/lib/hacks/text-emphasis-position.js +9 -28
- package/lib/hacks/transform-decl.js +43 -69
- package/lib/hacks/user-select.js +19 -27
- package/lib/hacks/writing-mode.js +19 -36
- package/lib/info.js +63 -93
- package/lib/old-selector.js +39 -60
- package/lib/old-value.js +17 -25
- package/lib/prefixer.js +83 -110
- package/lib/prefixes.js +233 -336
- package/lib/processor.js +420 -416
- package/lib/resolution.js +62 -98
- package/lib/selector.js +91 -139
- package/lib/supports.js +194 -246
- package/lib/transition.js +170 -265
- package/lib/utils.js +49 -72
- package/lib/value.js +77 -116
- package/lib/vendor.js +14 -0
- package/package.json +23 -12
|
@@ -1,101 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
warnGridGap = _require.warnGridGap,
|
|
18
|
-
inheritGridGap = _require.inheritGridGap;
|
|
19
|
-
|
|
20
|
-
function getGridRows(tpl) {
|
|
21
|
-
return tpl.trim().slice(1, -1).split(/["']\s*["']?/g);
|
|
1
|
+
let Declaration = require('../declaration')
|
|
2
|
+
let {
|
|
3
|
+
parseGridAreas,
|
|
4
|
+
warnMissedAreas,
|
|
5
|
+
prefixTrackProp,
|
|
6
|
+
prefixTrackValue,
|
|
7
|
+
getGridGap,
|
|
8
|
+
warnGridGap,
|
|
9
|
+
inheritGridGap
|
|
10
|
+
} = require('./grid-utils')
|
|
11
|
+
|
|
12
|
+
function getGridRows (tpl) {
|
|
13
|
+
return tpl
|
|
14
|
+
.trim()
|
|
15
|
+
.slice(1, -1)
|
|
16
|
+
.split(/["']\s*["']?/g)
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
_inheritsLoose(GridTemplateAreas, _Declaration);
|
|
26
|
-
|
|
27
|
-
function GridTemplateAreas() {
|
|
28
|
-
return _Declaration.apply(this, arguments) || this;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var _proto = GridTemplateAreas.prototype;
|
|
32
|
-
|
|
19
|
+
class GridTemplateAreas extends Declaration {
|
|
33
20
|
/**
|
|
34
21
|
* Translate grid-template-areas to separate -ms- prefixed properties
|
|
35
22
|
*/
|
|
36
|
-
|
|
37
|
-
if (prefix !== '-ms-') return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
gap =
|
|
43
|
-
|
|
23
|
+
insert (decl, prefix, prefixes, result) {
|
|
24
|
+
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
|
25
|
+
|
|
26
|
+
let hasColumns = false
|
|
27
|
+
let hasRows = false
|
|
28
|
+
let parent = decl.parent
|
|
29
|
+
let gap = getGridGap(decl)
|
|
30
|
+
gap = inheritGridGap(decl, gap) || gap
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
// remove already prefixed rows
|
|
33
|
+
// to prevent doubling prefixes
|
|
34
|
+
parent.walkDecls(/-ms-grid-rows/, i => i.remove())
|
|
48
35
|
|
|
49
|
-
|
|
36
|
+
// add empty tracks to rows
|
|
37
|
+
parent.walkDecls(/grid-template-(rows|columns)/, trackDecl => {
|
|
50
38
|
if (trackDecl.prop === 'grid-template-rows') {
|
|
51
|
-
hasRows = true
|
|
52
|
-
|
|
53
|
-
value = trackDecl.value;
|
|
39
|
+
hasRows = true
|
|
40
|
+
let { prop, value } = trackDecl
|
|
54
41
|
trackDecl.cloneBefore({
|
|
55
|
-
prop: prefixTrackProp({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}),
|
|
59
|
-
value: prefixTrackValue({
|
|
60
|
-
value: value,
|
|
61
|
-
gap: gap.row
|
|
62
|
-
})
|
|
63
|
-
});
|
|
42
|
+
prop: prefixTrackProp({ prop, prefix }),
|
|
43
|
+
value: prefixTrackValue({ value, gap: gap.row })
|
|
44
|
+
})
|
|
64
45
|
} else {
|
|
65
|
-
hasColumns = true
|
|
46
|
+
hasColumns = true
|
|
66
47
|
}
|
|
67
|
-
})
|
|
68
|
-
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
let gridRows = getGridRows(decl.value)
|
|
69
51
|
|
|
70
52
|
if (hasColumns && !hasRows && gap.row && gridRows.length > 1) {
|
|
71
53
|
decl.cloneBefore({
|
|
72
54
|
prop: '-ms-grid-rows',
|
|
73
55
|
value: prefixTrackValue({
|
|
74
|
-
value:
|
|
56
|
+
value: `repeat(${gridRows.length}, auto)`,
|
|
75
57
|
gap: gap.row
|
|
76
58
|
}),
|
|
77
59
|
raws: {}
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
|
|
60
|
+
})
|
|
61
|
+
}
|
|
81
62
|
|
|
63
|
+
// warnings
|
|
82
64
|
warnGridGap({
|
|
83
|
-
gap
|
|
84
|
-
hasColumns
|
|
85
|
-
decl
|
|
86
|
-
result
|
|
87
|
-
})
|
|
88
|
-
|
|
65
|
+
gap,
|
|
66
|
+
hasColumns,
|
|
67
|
+
decl,
|
|
68
|
+
result
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
let areas = parseGridAreas({
|
|
89
72
|
rows: gridRows,
|
|
90
|
-
gap
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
};
|
|
73
|
+
gap
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
warnMissedAreas(areas, decl, result)
|
|
95
77
|
|
|
96
|
-
|
|
97
|
-
}
|
|
78
|
+
return decl
|
|
79
|
+
}
|
|
80
|
+
}
|
|
98
81
|
|
|
99
|
-
|
|
82
|
+
GridTemplateAreas.names = ['grid-template-areas']
|
|
100
83
|
|
|
101
|
-
module.exports = GridTemplateAreas
|
|
84
|
+
module.exports = GridTemplateAreas
|
|
@@ -1,74 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _require = require('./grid-utils'),
|
|
12
|
-
parseTemplate = _require.parseTemplate,
|
|
13
|
-
warnMissedAreas = _require.warnMissedAreas,
|
|
14
|
-
getGridGap = _require.getGridGap,
|
|
15
|
-
warnGridGap = _require.warnGridGap,
|
|
16
|
-
inheritGridGap = _require.inheritGridGap;
|
|
17
|
-
|
|
18
|
-
var GridTemplate = /*#__PURE__*/function (_Declaration) {
|
|
19
|
-
_inheritsLoose(GridTemplate, _Declaration);
|
|
20
|
-
|
|
21
|
-
function GridTemplate() {
|
|
22
|
-
return _Declaration.apply(this, arguments) || this;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var _proto = GridTemplate.prototype;
|
|
26
|
-
|
|
1
|
+
let Declaration = require('../declaration')
|
|
2
|
+
let {
|
|
3
|
+
parseTemplate,
|
|
4
|
+
warnMissedAreas,
|
|
5
|
+
getGridGap,
|
|
6
|
+
warnGridGap,
|
|
7
|
+
inheritGridGap
|
|
8
|
+
} = require('./grid-utils')
|
|
9
|
+
|
|
10
|
+
class GridTemplate extends Declaration {
|
|
27
11
|
/**
|
|
28
12
|
* Translate grid-template to separate -ms- prefixed properties
|
|
29
13
|
*/
|
|
30
|
-
|
|
31
|
-
if (prefix !== '-ms-') return
|
|
14
|
+
insert (decl, prefix, prefixes, result) {
|
|
15
|
+
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
|
32
16
|
|
|
33
|
-
if (decl.parent.some(
|
|
34
|
-
return
|
|
35
|
-
})) {
|
|
36
|
-
return undefined;
|
|
17
|
+
if (decl.parent.some(i => i.prop === '-ms-grid-rows')) {
|
|
18
|
+
return undefined
|
|
37
19
|
}
|
|
38
20
|
|
|
39
|
-
|
|
21
|
+
let gap = getGridGap(decl)
|
|
22
|
+
|
|
40
23
|
/**
|
|
41
24
|
* we must insert inherited gap values in some cases:
|
|
42
25
|
* if we are inside media query && if we have no grid-gap value
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var inheritedGap = inheritGridGap(decl, gap);
|
|
26
|
+
*/
|
|
27
|
+
let inheritedGap = inheritGridGap(decl, gap)
|
|
46
28
|
|
|
47
|
-
|
|
48
|
-
decl
|
|
29
|
+
let { rows, columns, areas } = parseTemplate({
|
|
30
|
+
decl,
|
|
49
31
|
gap: inheritedGap || gap
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
let hasAreas = Object.keys(areas).length > 0
|
|
35
|
+
let hasRows = Boolean(rows)
|
|
36
|
+
let hasColumns = Boolean(columns)
|
|
54
37
|
|
|
55
|
-
var hasAreas = Object.keys(areas).length > 0;
|
|
56
|
-
var hasRows = Boolean(rows);
|
|
57
|
-
var hasColumns = Boolean(columns);
|
|
58
38
|
warnGridGap({
|
|
59
|
-
gap
|
|
60
|
-
hasColumns
|
|
61
|
-
decl
|
|
62
|
-
result
|
|
63
|
-
})
|
|
64
|
-
|
|
39
|
+
gap,
|
|
40
|
+
hasColumns,
|
|
41
|
+
decl,
|
|
42
|
+
result
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
warnMissedAreas(areas, decl, result)
|
|
65
46
|
|
|
66
|
-
if (hasRows && hasColumns || hasAreas) {
|
|
47
|
+
if ((hasRows && hasColumns) || hasAreas) {
|
|
67
48
|
decl.cloneBefore({
|
|
68
49
|
prop: '-ms-grid-rows',
|
|
69
50
|
value: rows,
|
|
70
51
|
raws: {}
|
|
71
|
-
})
|
|
52
|
+
})
|
|
72
53
|
}
|
|
73
54
|
|
|
74
55
|
if (hasColumns) {
|
|
@@ -76,15 +57,13 @@ var GridTemplate = /*#__PURE__*/function (_Declaration) {
|
|
|
76
57
|
prop: '-ms-grid-columns',
|
|
77
58
|
value: columns,
|
|
78
59
|
raws: {}
|
|
79
|
-
})
|
|
60
|
+
})
|
|
80
61
|
}
|
|
81
62
|
|
|
82
|
-
return decl
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return GridTemplate;
|
|
86
|
-
}(Declaration);
|
|
63
|
+
return decl
|
|
64
|
+
}
|
|
65
|
+
}
|
|
87
66
|
|
|
88
|
-
|
|
67
|
+
GridTemplate.names = ['grid-template']
|
|
89
68
|
|
|
90
|
-
module.exports = GridTemplate
|
|
69
|
+
module.exports = GridTemplate
|