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

Block comments should be preserved in "static" at rules #1233

Closed
hutber opened this issue May 21, 2015 · 3 comments · Fixed by #2001
Closed

Block comments should be preserved in "static" at rules #1233

hutber opened this issue May 21, 2015 · 3 comments · Fixed by #2001

Comments

@hutber
Copy link

hutber commented May 21, 2015

When using @'s it appears to fail.

@-moz-keyframes animatetoptop /* Firefox */ line 429
{
from {width:0%}
to {width:100%}
}

I'll get the following error.

[16:36:40] gulp-notify: [Compile Error] stylesheets\apps\tmm\_results.scss
429:17  top-level directive must be terminated by ';'

I'm using gulp-sass: 2.0.1

@xzyfer
Copy link
Contributor

xzyfer commented May 27, 2015

I am unable to reproduce this specific error. However I have noticed we incorrectly remove the comment and adding maintaining the authors whitespace.

@-moz-keyframes animatetoptop /* Firefox */ line 429
{
from {width:0%}
to {width:100%}
}

Ruby Sass

@-moz-keyframes animatetoptop /* Firefox */ line 429 {
  from {
    width: 0%; }
  to {
    width: 100%; } }

Libsass

@-moz-keyframes animatetoptop line 429
{
  from {
    width: 0%; }
  to {
    width: 100%; } }

@mgreter
Copy link
Contributor

mgreter commented Jun 13, 2015

The adjancent string is parsed literally and the comment node is part of it. Related to At_Rule parsing (I already did some improvements for values). This sample shows the behavior:

@-moz-keyframes        animatetoptop       /* Firefox */         line 429   {
from {width:0%}
to {width:100%}
}

ruby sass:

@-moz-keyframes animatetoptop       /* Firefox */         line 429 {
  from {
    width: 0%; }
  to {
    width: 100%; } }

Related to #1263

@mgreter mgreter added this to the 3.3.1 milestone Jun 13, 2015
@mgreter mgreter self-assigned this Jun 13, 2015
@mgreter mgreter modified the milestones: 3.4, 3.3.1 Jun 13, 2015
@hutber
Copy link
Author

hutber commented Jun 22, 2015

Interesting you couldn't reproduce it. I wonder what it could be about my set up that would cause this if its not libsass. I will look into my other processes and see if its something else causing the problem.

thanks

@mgreter mgreter changed the title top-level directive must be terminated by ';' Block comments should be preserved in "static" at rules Jul 20, 2015
@mgreter mgreter removed their assignment Jul 27, 2015
@mgreter mgreter self-assigned this Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants