-
Notifications
You must be signed in to change notification settings - Fork 140
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
Multiline comments removed? #12
Comments
Yes comments are entirely removed as part of the parsing process... I know that's not entirely desirable always, but at the moment there's no way of keeping comments. We definitely need to find a way to have them. |
This behavior does not follow the SASS language guidelines, which states multiline comments (delineated by /* and */) should be "preserved in the CSS output where possible" (http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#comments). I take this to mean that the comments will be kept as long as compression is off. Can you expand on why "there's no way of keeping comments" at the moment? |
most probably because the "compiler" drops comments as whitespace very early |
Yes, I see there is an explicit step to do this on https://github.com/Kronuz/pyScss/blob/master/scss/__init__.py#L781, but even if that call is removed, comments still seem to get taken out, but I'm not seeing where. |
You can't simply remove that line that removes comments, the rest of the compiler expects those lines not to exist, and having them sill there would make the compiler try to treat them as rules. To make it work, one has to add a special rule type for comments (so it can added to the children of the current rule and later printed during the output). Then, |
One other consideration: we may want to preserve top-of-file javadoc-style ( |
Closing this issue because is too old. Feel free to reopen if necessary. |
Are multiline comments preserved in compiled css? I done some tests, and seems that multiline comments are stripped during compilation
The text was updated successfully, but these errors were encountered: