postcss 8.3.6 → 8.3.7
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.
Potentially problematic release.
This version of postcss might be problematic. Click here for more details.
- package/README.md +7 -8
- package/lib/css-syntax-error.js +2 -2
- package/lib/processor.js +1 -1
- package/lib/terminal-highlight.js +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
@@ -89,8 +89,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
|
89
89
|
|
90
90
|
### Better CSS Readability
|
91
91
|
|
92
|
-
* [`
|
93
|
-
and mixins.
|
92
|
+
* [`postcss-nested`] unwraps nested rules the way Sass does.
|
94
93
|
* [`postcss-sorting`] sorts the content of rules and at-rules.
|
95
94
|
* [`postcss-utilities`] includes the most commonly used shortcuts and helpers.
|
96
95
|
* [`short`] adds and extends numerous shorthand properties.
|
@@ -146,7 +145,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
|
146
145
|
[`stylelint`]: https://github.com/stylelint/stylelint
|
147
146
|
[`stylefmt`]: https://github.com/morishitter/stylefmt
|
148
147
|
[`cssnano`]: https://cssnano.co/
|
149
|
-
[`
|
148
|
+
[`postcss-nested`]: https://github.com/postcss/postcss-nested
|
150
149
|
[`doiuse`]: https://github.com/anandthakker/doiuse
|
151
150
|
[`rtlcss`]: https://github.com/MohammadYounes/rtlcss
|
152
151
|
[`short`]: https://github.com/jonathantneal/postcss-short
|
@@ -310,8 +309,8 @@ Then create `postcss.config.js`:
|
|
310
309
|
```js
|
311
310
|
module.exports = {
|
312
311
|
plugins: [
|
313
|
-
require('
|
314
|
-
require('
|
312
|
+
require('autoprefixer'),
|
313
|
+
require('postcss-nested')
|
315
314
|
]
|
316
315
|
}
|
317
316
|
```
|
@@ -330,7 +329,7 @@ gulp.task('css', () => {
|
|
330
329
|
|
331
330
|
return gulp.src('src/**/*.css')
|
332
331
|
.pipe( sourcemaps.init() )
|
333
|
-
.pipe( postcss([ require('
|
332
|
+
.pipe( postcss([ require('autoprefixer'), require('postcss-nested') ]) )
|
334
333
|
.pipe( sourcemaps.write('.') )
|
335
334
|
.pipe( gulp.dest('build/') )
|
336
335
|
})
|
@@ -410,11 +409,11 @@ For other environments, you can use the JS API:
|
|
410
409
|
```js
|
411
410
|
const autoprefixer = require('autoprefixer')
|
412
411
|
const postcss = require('postcss')
|
413
|
-
const
|
412
|
+
const postcssNested = require('postcss-nested')
|
414
413
|
const fs = require('fs')
|
415
414
|
|
416
415
|
fs.readFile('src/app.css', (err, css) => {
|
417
|
-
postcss([
|
416
|
+
postcss([autoprefixer, postcssNested])
|
418
417
|
.process(css, { from: 'src/app.css', to: 'dest/app.css' })
|
419
418
|
.then(result => {
|
420
419
|
fs.writeFile('dest/app.css', result.css, () => true)
|
package/lib/css-syntax-error.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict'
|
2
2
|
|
3
|
-
let { red, bold, gray,
|
3
|
+
let { red, bold, gray, isColorSupported } = require('nanocolors')
|
4
4
|
|
5
5
|
let terminalHighlight = require('./terminal-highlight')
|
6
6
|
|
@@ -44,7 +44,7 @@ class CssSyntaxError extends Error {
|
|
44
44
|
if (!this.source) return ''
|
45
45
|
|
46
46
|
let css = this.source
|
47
|
-
if (color == null) color =
|
47
|
+
if (color == null) color = isColorSupported
|
48
48
|
if (terminalHighlight) {
|
49
49
|
if (color) css = terminalHighlight(css)
|
50
50
|
}
|
package/lib/processor.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "postcss",
|
3
|
-
"version": "8.3.
|
3
|
+
"version": "8.3.7",
|
4
4
|
"description": "Tool for transforming styles with JS plugins",
|
5
5
|
"engines": {
|
6
6
|
"node": "^10 || ^12 || >=14"
|
@@ -60,15 +60,17 @@
|
|
60
60
|
"license": "MIT",
|
61
61
|
"homepage": "https://postcss.org/",
|
62
62
|
"repository": "postcss/postcss",
|
63
|
+
"bugs": {
|
64
|
+
"url": "https://github.com/postcss/postcss/issues"
|
65
|
+
},
|
63
66
|
"dependencies": {
|
64
|
-
"
|
65
|
-
"nanoid": "^3.1.
|
67
|
+
"nanocolors": "^0.1.5",
|
68
|
+
"nanoid": "^3.1.25",
|
66
69
|
"source-map-js": "^0.6.2"
|
67
70
|
},
|
68
71
|
"browser": {
|
69
72
|
"./lib/terminal-highlight": false,
|
70
73
|
"source-map-js": false,
|
71
|
-
"colorette": false,
|
72
74
|
"path": false,
|
73
75
|
"url": false,
|
74
76
|
"fs": false
|