Comments (8)
Stylelint config is not fully compatible with this plugin yet. gajus/stylelint-config-canonical@2c58f19#diff-33d8a40ae0050661239a87463149dcafR4 array of arrays will be a correct config for PostCSS Sorting.
from postcss-sorting.
@hudochenkov Would you accept a PR that makes this change? or is there a reason this is on hold (since it does not look like a big change)
from postcss-sorting.
It's a big change because it would broke plugin backwards compatibility. Grouping in this plugin allows to group declarations, nested rules, at-rules. See default config. Stylelint only support grouping for declarations only.
We are working now on a plugin for stylelint which will check sort order for non declarations (nested rules, at-rules). After this plugin will be ready I will think about how to integrate postcss-sorting in stylefmt, tool which format style sheets based on stylelint config. Now stylefmt support stylelint's declaration-block-properties-order
, but only with config like this: ["array", "of", "unprefixed", "property", "names"]
.
from postcss-sorting.
It's a big change because it would broke plugin backwards compatibility.
I disagree. This plugin could support both syntaxes without introducing backwards breaking changes.
from postcss-sorting.
I'll be glad if you right because it would be a great feature. Feel free to make a PR if it only adds new syntax and won't break anything.
from postcss-sorting.
After this plugin will be ready I will think about how to integrate postcss-sorting in stylefmt, tool which format style sheets based on stylelint config.
This is an excellent idea! It looks like stylefmt added support for declaration-block-properties-order
yesterday using postcss-sorting. Is there a chicken and egg thing going on here? Either way, it's feels like things are coming together nicely and that your stylelint plugin will be the missing piece of the puzzle :)
from postcss-sorting.
@jeddy3 Yeah, I found out about this support from PostCSS twitter :) And as I can see, it's very limited support. I'm going to fix that too :) It's won't be a full support, because stylelint have “flexible” order option, and postcss-sorting do strict order only. But I will change stylefmt's part of declaration-block-properties-order
to support stylelint's rule as close as possible.
from postcss-sorting.
It's won't be a full support, because stylelint have “flexible” order option, and postcss-sorting do strict order only.
That makes sense to me. I'm not sure how many people use the "flexible" order option, but I suspect it's a much smaller number than the combined total of people who use alphabetical or define a strict custom order. If someone does use the "flexible" order option, then they can always PR the support themselves if they want it :)
from postcss-sorting.
Related Issues (20)
- Bootstrap 5 support? HOT 8
- CSS in HTML HOT 1
- Feature request: sort simple media queries by query parameter values HOT 1
- 01:24:53 [vite] Internal server error: Cannot read properties of undefined (reading 'length') HOT 2
- Error when using with postcss-sass: Cannot read properties of undefined (reading 'includes') HOT 2
- suggestion: wildcards to prevent re-ordering to affect the visual outcome HOT 1
- SASS mixins not getting sorted alphabetically HOT 1
- Error when run with error `TypeError: Cannot read property 'includes' of undefined` HOT 1
- Support for alphabetical sort with specific properties before all HOT 1
- postcss-sorting not working as expected HOT 6
- security vulnerability PostCSS HOT 1
- Extend sorting rule from another file HOT 1
- Less variables order in declaration block HOT 3
- Feature request: Non-standard CSS compatible HOT 2
- Migration to v3 Postcss Sorting HOT 5
- Could we support *.vue file? HOT 5
- Compine at rules with properties in sorting HOT 1
- rule sorting HOT 3
- Using astroturf composes HOT 4
- Add limited sorting support for CSS-in-JS with interpolation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-sorting.