Open justrhysism opened 5 years ago
@justrhysism great idea, I've been wanting the same thing. I often find my selector rules to have lots of single-line groups which is kind of weird.
I did a quick peek at the source and ran tests (npm i; npm i -D jest-cli; npm test
), and based on what I saw, I don't think I'm savvy enough about how stylelint plugins and stylelint-order work in order to hack this out myself.
Would you want to try pairing on it?
My time is limited (young kids consuming life) but I think this feature would be super useful (as is the entire plugin) so am happy to contribute :) - assuming the author is happy to accept.
@jm3 alright so I've taken an initial look at this, and have realised that this plugin is basically just a configurator on top of stylelint-order.
The properties-order rule has an option emptyLineBefore
which inserts the line above the group.
It appears that to get this feature in this plugin, we're going to need to add it to that plugin.
So took me a while to get there as I had to add the feature to stylelint-order
first!
Any movement on this? Is there a way we could use this new option while we wait for the rational order to be updated?
@zeorin not sure, the project seems to be abandoned :(
I like separating the properties into rational groups with lines in between - however when there's only a handful (< 3 || 4) of properties the gaps are a bit unwieldily and it makes it difficult to reason.
Suggestion: a minimum property setting for enacting the empty lines.