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

Allow user to use SassBeautify anywhere #27

Closed
WilliamVercken opened this issue Dec 10, 2013 · 7 comments
Closed

Allow user to use SassBeautify anywhere #27

WilliamVercken opened this issue Dec 10, 2013 · 7 comments

Comments

@WilliamVercken
Copy link

Hi !

This is not an issue, but a feature request. :)

  • If I use only CSS on my .scss file, it works. Why can't we use it on a .css file ?
  • Sometimes, I have to copy/paste some code in a blank file, and I want to clean it with SassBeautify : but I have to save the file first in an .scss file...

Maybe you could just put an option (in the settings file) allowing us to use it wherever and whenever we want to ?

Thank you !

@badsyntax
Copy link
Owner

Hey, thanks for the info. I did not know this feature existed! We can use sass-convert to beautify CSS (somewhat). It's not perfect though! For example, it does not beautify the css selectors very well.

EG, try beautify this css:

article        .title {
        color: red;
}

(The underlying command would be this: sass-convert --to scss --from scss style.css)

I don't think sass-convert was intended to beautify CSS, thus there's a very real chance this won't work sometime in the future, but there's no harm in releasing this as a 'hidden' feature. This should be an easy change, I will add it soon!

badsyntax added a commit that referenced this issue Dec 13, 2013
…ll remain undocumented and could break sometime in the future. Refs #27
@badsyntax
Copy link
Owner

Ok I've added this feature but as mentioned before I'm going to keep it 'hidden' and undocumented. Upgrade your packages to pull down this change. ( I can't say exactly when you'll be able to pull down this latest change, but likely by the time you read this it will be updated, otherwise, give it a couple of hours.) I'll close this ticket when I've verified this works when installing/upgrading the package via sublime package control.

@badsyntax
Copy link
Owner

I'm going to close this ticket as the ST package control has updated this package. I had to uninstall and then re-install this package to get the latest changes (instead of just upgrading).

@WilliamVercken
Copy link
Author

Hi ! (sorry, late answer)
I just tested, and it works on .css files.
Not on an unsaved file (without .css or .scss extension), so we can't use it "anywhere" but nevermind !
Thank you for your work ! :)

@badsyntax
Copy link
Owner

I don't think I'll be able to make it work on unsaved files as I need the file extension to determine what type of file the user is trying to beautify.

@WilliamVercken
Copy link
Author

Yeah, I looked at the code here 9595a99 and I saw you needed the file extension, that's why I didn't insist ! :)

@badsyntax
Copy link
Owner

FYI, here's the cause of the upgrading issue now that I've moved to using tags: wbond/package_control_channel#2480

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

No branches or pull requests

2 participants