-
-
Notifications
You must be signed in to change notification settings - Fork 31
Add space between subclasses, children styles #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your PR, but I can't accept it yet. This is breaking change. It will break backward compatibility. And I personally don't like this empty lines, but it may be useful for some developers. You may add a new option {
"sort-order": [
[
"display",
"visibility",
"..."
],
[ ">child" ]
],
"empty-lines-between-children-rules": 1
}This will add 1 empty line between child rules. The default value should be set to 0, so nothing breaks for users when they update to the new plugin version. P. S. CSSComb's issue you mention is already solved by this plugin :) |
|
Thank you for responding so quickly! Your arguments sound resonable, I`ll add option. |
|
@hudochenkov, is it better now? |
test/test.js
Outdated
| }); | ||
|
|
||
| test('Should insert empty lines between children classes in accordance with option \'empty-lines-between-children-rules\'', t => { | ||
| return run(t, 'prefixed', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be return run(t, 'lines-between-children.expected', {, because second argument for run() is file name without extension. Also rename .scss to .css. You will see if tests working if file lines-between-children.actual.css will be created after tests run. This file will show what is actual output of the current test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
facepalm on my face! Copy paste is evil!
Fixed it
|
@scalder27 this is very cool! Please fix issues I'm commented about. Can you also add documentation for new option? |
|
@hudochenkov issues was fixed, documentation was added =) |
|
@scalder27 this is amazing! Can you make the last two changes, please? :)
|
It would be cool keep indentation between ">child" classes. Much more readable. Also, I`ve had in mind a csscomb.js issue about this (csscomb/csscomb.js#441).
|
@hudochenkov amazingly I |
|
You did a great work, @scalder27! Thank you! |
Add space between subclasses, children styles
|
Thank you, @hudochenkov, you did a really great work with postcss-sorting! When csscomb.js let us down, your project saved us from an unavoidable stylesheets entropy =) |
|
@scalder27 I've released the new version :) |
|
@hudochenkov, its unbelievably awesome! My first github contribution! To the instrument that I and my team using daily. Coool! |
It would be cool keep indentation between ">child" classes. Much more readable.
Also, I`ve had in mind a csscomb.js issue about this (csscomb/csscomb.js#441).