postcss-reduce-initial 4.0.0-rc.2 → 4.0.3

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/README.md CHANGED
@@ -72,7 +72,7 @@ examples for your environment.
72
72
 
73
73
  ## Contributors
74
74
 
75
- See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md).
75
+ See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
76
76
 
77
77
 
78
78
  ## License
@@ -1,34 +1,6 @@
1
1
  {
2
- "-ms-overflow-style": "auto",
3
- "-moz-binding": "none",
4
- "-moz-border-bottom-colors": "none",
5
- "-moz-border-left-colors": "none",
6
- "-moz-border-right-colors": "none",
7
- "-moz-border-top-colors": "none",
8
- "-moz-force-broken-image-icon": "0",
9
- "-moz-image-region": "auto",
10
- "-moz-orient": "inline",
11
- "-moz-outline-radius-bottomleft": "0",
12
- "-moz-outline-radius-bottomright": "0",
13
- "-moz-outline-radius-topleft": "0",
14
- "-moz-outline-radius-topright": "0",
15
- "-moz-text-blink": "none",
16
- "-moz-user-focus": "none",
17
- "-moz-user-input": "auto",
18
- "-webkit-border-before-style": "none",
19
- "-webkit-border-before-width": "medium",
20
- "-webkit-box-reflect": "none",
21
- "-webkit-mask-attachment": "scroll",
22
- "-webkit-mask-clip": "border",
23
- "-webkit-mask-image": "none",
24
- "-webkit-mask-position": "0% 0%",
25
- "-webkit-mask-position-x": "0%",
26
- "-webkit-mask-position-y": "0%",
27
- "-webkit-mask-repeat": "repeat",
28
- "-webkit-mask-repeat-x": "repeat",
29
- "-webkit-mask-repeat-y": "repeat",
30
- "-webkit-tap-highlight-color": "black",
31
- "-webkit-text-stroke-width": "0",
2
+ "align-content": "normal",
3
+ "align-items": "normal",
32
4
  "align-self": "auto",
33
5
  "animation-delay": "0s",
34
6
  "animation-direction": "normal",
@@ -37,6 +9,7 @@
37
9
  "animation-iteration-count": "1",
38
10
  "animation-name": "none",
39
11
  "animation-timing-function": "ease",
12
+ "appearance": "auto",
40
13
  "azimuth": "center",
41
14
  "backdrop-filter": "none",
42
15
  "background-attachment": "scroll",
@@ -46,7 +19,10 @@
46
19
  "background-position-x": "left",
47
20
  "background-position-y": "top",
48
21
  "background-repeat": "repeat",
22
+ "block-overflow": "clip",
49
23
  "block-size": "auto",
24
+ "border-block-style": "none",
25
+ "border-block-width": "medium",
50
26
  "border-block-end-style": "none",
51
27
  "border-block-end-width": "medium",
52
28
  "border-block-start-style": "none",
@@ -55,10 +31,14 @@
55
31
  "border-bottom-right-radius": "0",
56
32
  "border-bottom-style": "none",
57
33
  "border-bottom-width": "medium",
58
- "border-image-outset": "0s",
34
+ "border-end-end-radius": "0",
35
+ "border-end-start-radius": "0",
36
+ "border-image-outset": "0",
59
37
  "border-image-slice": "100%",
60
38
  "border-image-source": "none",
61
39
  "border-image-width": "1",
40
+ "border-inline-style": "none",
41
+ "border-inline-width": "medium",
62
42
  "border-inline-end-style": "none",
63
43
  "border-inline-end-width": "medium",
64
44
  "border-inline-start-style": "none",
@@ -68,20 +48,15 @@
68
48
  "border-right-style": "none",
69
49
  "border-right-width": "medium",
70
50
  "border-spacing": "0",
51
+ "border-start-end-radius": "0",
52
+ "border-start-start-radius": "0",
71
53
  "border-top-left-radius": "0",
72
54
  "border-top-right-radius": "0",
73
55
  "border-top-style": "none",
74
56
  "border-top-width": "medium",
75
57
  "bottom": "auto",
76
58
  "box-decoration-break": "slice",
77
- "box-direction": "normal",
78
- "box-flex": "0",
79
- "box-flex-group": "1",
80
- "box-lines": "single",
81
- "box-ordinal-group": "1",
82
- "box-pack": "start",
83
59
  "box-shadow": "none",
84
- "box-suppress": "show",
85
60
  "break-after": "auto",
86
61
  "break-before": "auto",
87
62
  "break-inside": "auto",
@@ -96,13 +71,12 @@
96
71
  "column-rule-width": "medium",
97
72
  "column-span": "none",
98
73
  "column-width": "auto",
74
+ "contain": "none",
99
75
  "content": "normal",
100
76
  "counter-increment": "none",
101
77
  "counter-reset": "none",
102
78
  "cursor": "auto",
103
79
  "direction": "ltr",
104
- "display-inside": "auto",
105
- "display-list": "none",
106
80
  "empty-cells": "show",
107
81
  "filter": "none",
108
82
  "flex-basis": "auto",
@@ -114,6 +88,7 @@
114
88
  "font-feature-settings": "normal",
115
89
  "font-kerning": "auto",
116
90
  "font-language-override": "normal",
91
+ "font-optical-sizing": "auto",
117
92
  "font-variation-settings": "normal",
118
93
  "font-size": "medium",
119
94
  "font-size-adjust": "none",
@@ -139,6 +114,7 @@
139
114
  "grid-template-areas": "none",
140
115
  "grid-template-columns": "none",
141
116
  "grid-template-rows": "none",
117
+ "hanging-punctuation": "none",
142
118
  "height": "auto",
143
119
  "hyphens": "manual",
144
120
  "image-orientation": "0deg",
@@ -148,30 +124,47 @@
148
124
  "initial-letter": "normal",
149
125
  "initial-letter-align": "auto",
150
126
  "inline-size": "auto",
127
+ "inset": "auto",
128
+ "inset-block": "auto",
129
+ "inset-block-end": "auto",
130
+ "inset-block-start": "auto",
131
+ "inset-inline": "auto",
132
+ "inset-inline-end": "auto",
133
+ "inset-inline-start": "auto",
151
134
  "isolation": "auto",
135
+ "justify-content": "normal",
136
+ "justify-items": "legacy",
137
+ "justify-self": "auto",
152
138
  "left": "auto",
153
139
  "letter-spacing": "normal",
154
140
  "line-break": "auto",
141
+ "line-clamp": "none",
155
142
  "line-height": "normal",
156
143
  "list-style-image": "none",
157
144
  "list-style-type": "disc",
145
+ "margin-block": "0",
158
146
  "margin-block-end": "0",
159
147
  "margin-block-start": "0",
160
148
  "margin-bottom": "0",
149
+ "margin-inline": "0",
161
150
  "margin-inline-end": "0",
162
151
  "margin-inline-start": "0",
163
152
  "margin-left": "0",
164
153
  "margin-right": "0",
165
154
  "margin-top": "0",
166
- "marker-offset": "auto",
155
+ "mask-border-mode": "alpha",
156
+ "mask-border-outset": "0",
157
+ "mask-border-slice": "0",
158
+ "mask-border-source": "none",
159
+ "mask-border-width": "auto",
167
160
  "mask-composite": "add",
168
161
  "mask-image": "none",
169
- "mask-position": "0% 0%",
170
- "mask-repeat": "repeat",
162
+ "mask-position": "center",
171
163
  "mask-size": "auto",
172
164
  "max-block-size": "0",
173
165
  "max-height": "none",
174
166
  "max-inline-size": "0",
167
+ "max-lines": "none",
175
168
  "max-width": "none",
176
169
  "min-block-size": "0",
177
170
  "min-height": "0",
@@ -180,12 +173,9 @@
180
173
  "mix-blend-mode": "normal",
181
174
  "object-fit": "fill",
182
175
  "offset-anchor": "auto",
183
- "offset-block-end": "auto",
184
- "offset-block-start": "auto",
185
- "offset-inline-end": "auto",
186
- "offset-inline-start": "auto",
187
176
  "offset-distance": "0",
188
177
  "offset-path": "none",
178
+ "offset-position": "auto",
189
179
  "offset-rotate": "auto",
190
180
  "opacity": "1.0",
191
181
  "order": "0",
@@ -193,10 +183,15 @@
193
183
  "outline-offset": "0",
194
184
  "outline-style": "none",
195
185
  "outline-width": "medium",
186
+ "overflow-anchor": "auto",
187
+ "overflow-block": "auto",
188
+ "overflow-inline": "auto",
196
189
  "overflow-wrap": "normal",
190
+ "padding-block": "0",
197
191
  "padding-block-end": "0",
198
192
  "padding-block-start": "0",
199
193
  "padding-bottom": "0",
194
+ "padding-inline": "0",
200
195
  "padding-inline-end": "0",
201
196
  "padding-inline-start": "0",
202
197
  "padding-left": "0",
@@ -205,19 +200,48 @@
205
200
  "page-break-after": "auto",
206
201
  "page-break-before": "auto",
207
202
  "page-break-inside": "auto",
203
+ "paint-order": "normal",
208
204
  "perspective": "none",
205
+ "place-content": "normal",
209
206
  "pointer-events": "auto",
210
207
  "position": "static",
211
208
  "resize": "none",
212
209
  "right": "auto",
210
+ "rotate": "none",
211
+ "row-gap": "normal",
213
212
  "ruby-position": "over",
213
+ "scale": "none",
214
+ "scrollbar-color": "auto",
215
+ "scrollbar-width": "auto",
214
216
  "scroll-behavior": "auto",
217
+ "scroll-margin": "0",
218
+ "scroll-margin-block": "0",
219
+ "scroll-margin-block-start": "0",
220
+ "scroll-margin-block-end": "0",
221
+ "scroll-margin-bottom": "0",
222
+ "scroll-margin-inline": "0",
223
+ "scroll-margin-inline-start": "0",
224
+ "scroll-margin-inline-end": "0",
225
+ "scroll-margin-left": "0",
226
+ "scroll-margin-right": "0",
227
+ "scroll-margin-top": "0",
228
+ "scroll-padding": "auto",
229
+ "scroll-padding-block": "auto",
230
+ "scroll-padding-block-start": "auto",
231
+ "scroll-padding-block-end": "auto",
232
+ "scroll-padding-bottom": "auto",
233
+ "scroll-padding-inline": "auto",
234
+ "scroll-padding-inline-start": "auto",
235
+ "scroll-padding-inline-end": "auto",
236
+ "scroll-padding-left": "auto",
237
+ "scroll-padding-right": "auto",
238
+ "scroll-padding-top": "auto",
239
+ "scroll-snap-align": "none",
215
240
  "scroll-snap-coordinate": "none",
216
241
  "scroll-snap-points-x": "none",
217
242
  "scroll-snap-points-y": "none",
243
+ "scroll-snap-stop": "normal",
218
244
  "scroll-snap-type": "none",
219
- "scroll-snap-type-x": "none",
220
- "scroll-snap-type-y": "none",
221
245
  "shape-image-threshold": "0.0",
222
246
  "shape-margin": "0",
223
247
  "shape-outside": "none",
@@ -226,9 +250,11 @@
226
250
  "text-align-last": "auto",
227
251
  "text-combine-upright": "none",
228
252
  "text-decoration-line": "none",
253
+ "text-decoration-skip-ink": "auto",
229
254
  "text-decoration-style": "solid",
230
255
  "text-emphasis-style": "none",
231
256
  "text-indent": "0",
257
+ "text-justify": "auto",
232
258
  "text-orientation": "mixed",
233
259
  "text-overflow": "clip",
234
260
  "text-rendering": "auto",
@@ -243,8 +269,8 @@
243
269
  "transition-duration": "0s",
244
270
  "transition-property": "all",
245
271
  "transition-timing-function": "ease",
272
+ "translate": "none",
246
273
  "unicode-bidi": "normal",
247
- "user-select": "auto",
248
274
  "white-space": "normal",
249
275
  "widows": "2",
250
276
  "width": "auto",
@@ -1,19 +1,14 @@
1
1
  {
2
- "-moz-float-edge": "content-box",
3
- "-moz-stack-sizing": "stretch-to-fit",
4
- "-moz-user-modify": "read-only",
5
- "-webkit-border-before-color": "currentcolor",
6
- "-webkit-mask-composite": "source-over",
7
- "-webkit-text-fill-color": "currentcolor",
8
- "-webkit-text-stroke-color": "currentcolor",
9
2
  "background-clip": "border-box",
10
3
  "background-color": "transparent",
11
4
  "background-origin": "padding-box",
12
5
  "background-size": "auto auto",
6
+ "border-block-color": "currentcolor",
13
7
  "border-block-end-color": "currentcolor",
14
8
  "border-block-start-color": "currentcolor",
15
9
  "border-bottom-color": "currentcolor",
16
10
  "border-collapse": "separate",
11
+ "border-inline-color": "currentcolor",
17
12
  "border-inline-end-color": "currentcolor",
18
13
  "border-inline-start-color": "currentcolor",
19
14
  "border-left-color": "currentcolor",
@@ -21,14 +16,12 @@
21
16
  "border-top-color": "currentcolor",
22
17
  "box-sizing": "content-box",
23
18
  "column-rule-color": "currentcolor",
24
- "display-outside": "inline-level",
25
19
  "font-synthesis": "weight style",
26
- "justify-content": "flex-start",
27
20
  "mask-clip": "border-box",
28
21
  "mask-mode": "match-source",
29
22
  "mask-origin": "border-box",
23
+ "mask-repeat": "repeat",
30
24
  "mask-type": "luminance",
31
- "overflow-clip-box": "padding-box",
32
25
  "ruby-align": "space-around",
33
26
  "ruby-merge": "separate",
34
27
  "text-decoration-color": "currentcolor",
package/dist/index.js CHANGED
@@ -26,28 +26,32 @@ var _toInitial2 = _interopRequireDefault(_toInitial);
26
26
 
27
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
28
 
29
- var initial = 'initial';
29
+ const initial = 'initial';
30
30
 
31
- exports.default = (0, _postcss.plugin)('postcss-reduce-initial', function () {
32
- return function (css, result) {
33
- var resultOpts = result.opts || {};
34
- var browsers = (0, _browserslist2.default)(null, {
31
+ exports.default = (0, _postcss.plugin)('postcss-reduce-initial', () => {
32
+ return (css, result) => {
33
+ const resultOpts = result.opts || {};
34
+ const browsers = (0, _browserslist2.default)(null, {
35
35
  stats: resultOpts.stats,
36
36
  path: __dirname,
37
37
  env: resultOpts.env
38
38
  });
39
- var initialSupport = (0, _caniuseApi.isSupported)('css-initial-value', browsers);
40
- css.walkDecls(function (decl) {
41
- var prop = decl.prop;
42
39
 
43
- if (initialSupport && (0, _has2.default)(_toInitial2.default, prop) && decl.value === _toInitial2.default[prop]) {
40
+ const initialSupport = (0, _caniuseApi.isSupported)('css-initial-value', browsers);
41
+
42
+ css.walkDecls(decl => {
43
+ const lowerCasedProp = decl.prop.toLowerCase();
44
+
45
+ if (initialSupport && (0, _has2.default)(_toInitial2.default, lowerCasedProp) && decl.value.toLowerCase() === _toInitial2.default[lowerCasedProp]) {
44
46
  decl.value = initial;
45
47
  return;
46
48
  }
47
- if (decl.value !== initial || !_fromInitial2.default[prop]) {
49
+
50
+ if (decl.value.toLowerCase() !== initial || !_fromInitial2.default[lowerCasedProp]) {
48
51
  return;
49
52
  }
50
- decl.value = _fromInitial2.default[prop];
53
+
54
+ decl.value = _fromInitial2.default[lowerCasedProp];
51
55
  });
52
56
  };
53
57
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-reduce-initial",
3
- "version": "4.0.0-rc.2",
3
+ "version": "4.0.3",
4
4
  "description": "Reduce initial definitions to the actual initial value, where possible.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -20,29 +20,28 @@
20
20
  "license": "MIT",
21
21
  "devDependencies": {
22
22
  "babel-cli": "^6.0.0",
23
- "cross-env": "^3.0.0",
24
- "got": "^6.0.0",
25
- "html2plaintext": "^1.0.0",
26
- "is-html": "^1.0.0",
23
+ "cross-env": "^5.0.0",
24
+ "got": "^8.0.0",
25
+ "html2plaintext": "^2.0.0",
27
26
  "write-file": "^1.0.0"
28
27
  },
29
- "homepage": "https://github.com/ben-eb/cssnano",
28
+ "homepage": "https://github.com/cssnano/cssnano",
30
29
  "author": {
31
30
  "name": "Ben Briggs",
32
31
  "email": "beneb.info@gmail.com",
33
32
  "url": "http://beneb.info"
34
33
  },
35
- "repository": "ben-eb/cssnano",
34
+ "repository": "cssnano/cssnano",
36
35
  "dependencies": {
37
- "browserslist": "^2.0.0",
38
- "caniuse-api": "^2.0.0",
36
+ "browserslist": "^4.0.0",
37
+ "caniuse-api": "^3.0.0",
39
38
  "has": "^1.0.0",
40
- "postcss": "^6.0.0"
39
+ "postcss": "^7.0.0"
41
40
  },
42
41
  "bugs": {
43
- "url": "https://github.com/ben-eb/cssnano/issues"
42
+ "url": "https://github.com/cssnano/cssnano/issues"
44
43
  },
45
44
  "engines": {
46
- "node": ">=4"
45
+ "node": ">=6.9.0"
47
46
  }
48
47
  }
package/CHANGELOG.md DELETED
@@ -1,18 +0,0 @@
1
- # 4.0.0-rc.0
2
-
3
- * Breaking: Drops support for Node 0.12, we now require at least Node 4.
4
- * Breaking: Update PostCSS to 6.0.0.
5
- * Added: This module can now convert initial values *to* the `initial` keyword,
6
- but only when the browser support is sufficient. You may use Browserslist to
7
- supply a list of browsers; we recommend using the config file as the same
8
- values will be propagated to other cssnano plugins which have the same
9
- functionality. See https://github.com/ai/browserslist#config-file for
10
- more details.
11
-
12
- # 1.0.1
13
-
14
- * Update the initial value of `user-select` from `none` to `auto`.
15
-
16
- # 1.0.0
17
-
18
- * Initial release.