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

Inline SASS / SCSS comments #12

Closed
WilliamVercken opened this issue Aug 12, 2013 · 5 comments
Closed

Inline SASS / SCSS comments #12

WilliamVercken opened this issue Aug 12, 2013 · 5 comments

Comments

@WilliamVercken
Copy link

Hi !
There is a problem with the comments when I use SassBeautify.

My SCSS code :

@mixin opacity($opacity) {
    filter: alpha(opacity=#{$opacity}); // IE 5-9+
    opacity: $opacity * 0.01;
}

$color1: #FF0000; // Red
$color2: #FFBF00; // Orange
$color3: #FFFF00; // Yellow

When I use SassBeautify, here is the result :

@mixin opacity($opacity) {
    filter: alpha(opacity=#{$opacity});
    // IE 5-9+
    opacity: $opacity * 0.01;
}

$color1: red;

// Red
$color2: #ffbf00;

// Orange
$color3: yellow;

// Yellow

I hope you will find a solution to this issue. :(

Your extension is almost perfect ! (I'd also like SassBeautify usable with CSS files. And by the way, an option to choose if we want, or not, a space between two declarations blocks or before comments ! Maybe some future features ? :p)

Thanks a lot for your attention !

@badsyntax
Copy link
Owner

Hey there, thanks for this bug report. Unfortunately this is the default behaviour of how sass compiles scss. (See here: sass/sass#235)
I'll wait to hear from the sass devs if they plan to support inline comments in the future.

@WilliamVercken
Copy link
Author

Ok, so "wait and see". I hope they will answer to your comment soon. :)

@badsyntax
Copy link
Owner

I don't want to think about doing this myself (in python land) if there are any plans for sass to support this itself. It's also a bit frustrating for me to see a lot these issues coming through from users without having the ability to resolve them myself, as the compilation/beautification is entirely performed by sass. On the upside, I'm constantly feeding these issues through to Sass, so if/when they get fixed, everyone benefits.
I will update this ticket if I get any updates.

@badsyntax
Copy link
Owner

I'm going to close this ticket as it's simply not supported by sass.

The sass developers are not completely ignoring this issue, so there's a chance this will be fixed in a future release, and I'll keep my eye on it, but for now, sadly, sass-convert does not support inline comments. I'll add a note the README.

@ldexterldesign
Copy link

+1

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

3 participants