postcss-sorting | PostCSS plugin to keep rules and at-rules content in order | Plugin library
kandi X-RAY | postcss-sorting Summary
kandi X-RAY | postcss-sorting Summary
PostCSS plugin to keep rules and at-rules content in order. Lint and autofix stylesheet order with stylelint-order.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Validate order options
- Validate CSS node .
- After comment block
- Verifies that the provided options are valid .
- Formats a declaration before node .
- Given a comment node return a list of comments
- capture comments before next node
- Validates options position
- Checks if the given literal is shorthand .
- Report an error .
postcss-sorting Key Features
postcss-sorting Examples and Code Snippets
Community Discussions
Trending Discussions on postcss-sorting
QUESTION
I don't even know how to explain my problem shortly in title. I want to create task which will follow these steps:
- Take Sass File as a source (Ex. src/scss/main.scss)
- Sort css properties with 'postcss-sorting'
- Overwrite source file to same path (Ex. src/scss/main.scss)
- Take sorted scss file and compile to css
- Write to css folder (Ex. dist/css)
I try to write this task but when i start to watch scss file changes, task having infinite loop. I tried with 2 different tasks too (one for sort css properties and write file, other one for compile and write) it still looping. I don't want to sort only css properties in css file, i want to sort my scss file too. That is my example code:
...ANSWER
Answered 2020-May-09 at 20:10You can use gulp-changed, it will override the file only if there is a change, preventing the infinite loop:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install postcss-sorting
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page