Skip to content
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

Support newline-between-rules for CSS #211

Closed
langdonx opened this issue Feb 11, 2015 · 7 comments
Closed

Support newline-between-rules for CSS #211

langdonx opened this issue Feb 11, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@langdonx
Copy link

It exists as a checkbox on the settings screen, and I've set it to true in my .jsbeautifyrc file, but neither seem to have any effect.

js-beautify supports the feature through -N or --newline-between-rules.

Side note: -L or --selector-separator-newline also seem to not be supported, but appear to be the default anyway.

@sebastiankade
Copy link

+1

Also "preserve_newlines" does not seem to be respected for LESS files.

@prettydiff
Copy link
Collaborator

This is a duplicate of issue #180

The bug is due to a difference in default values for the node-library compared to the web tool for prettydiff.

@Glavin001
Copy link
Owner

CSS is handled by js-beautify and LESS and SASS is handled by Prettydiff.
So @sebastiankade your issue is with Prettydiff, while @langdonx can you confirm that you are beautifying CSS and not LESS or SASS.

@langdonx
Copy link
Author

@Glavin001 Correct, I do not use LESS/SASS.

@sebastiankade
Copy link

@Glavin001 I just checked and prettydiff correctly handles newlines in less when the 'preserve' option is set to 'all' or 'css'. In my beautify settings I have 'preserve_newlines' set to true but this doesnt seem to make it through to prettydiff for less files.

@Glavin001
Copy link
Owner

@sebastiankade you are correct, currently those options do not get passed to prettydiff. See https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/css-prettydiff-beautify.coffee#L4-L10
This should be an easy fix. If you have not already done so, please create another issue for this LESS/SCSS & Prettydiff support bug on Atom Beautify.

@langdonx this may be an issue with js-beautify itself. Those options are passed directly to js-beautify, so anything you can put into your .jsbeautifyrc will work with js-beautify, if js-beautify in fact supports it. If this is a new feature of js-beautify then I may need to update our js-beautify dependency to resolve this.

@Glavin001
Copy link
Owner

Fixed in #245.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants