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

In-line comments causing url parenthesis to be removed #1082

Closed
dandehavilland opened this issue Apr 9, 2015 · 5 comments · Fixed by #1085
Closed

In-line comments causing url parenthesis to be removed #1082

dandehavilland opened this issue Apr 9, 2015 · 5 comments · Fixed by #1085

Comments

@dandehavilland
Copy link

I have some comments in my source, dev notes about the original source of some font files. The presence of these comments are somehow leading to the parentheses for the url directives being removed.

// fonts.scss
@font-face {
  font-family: 'My Font';
  font-style: normal;
  font-weight: 300;
  src: local('My Font'), local('My-Font'),
    /* from http://.... original source of .eot */
    url('my-font.eot?#iefix') format('embedded-opentype'),
    /* from http://.... original source of .woff */
    url('my-font.woff') format('woff'),
    /* from http://.... original source of .ttf */
    url('my-font.ttf') format('truetype'),
    /* from http://.... original source of .svg */
    url('my-font.svg#MyFont') format('svg');
}

Compiles to:

// fonts.css
@font-face {
  font-family: 'My Font';
  font-style: normal;
  font-weight: 300;
  src: local("My Font"), local("My-Font"), url "my-font.eot?#iefix" format("embedded-opentype"), url "my-font.woff" format("woff"), url "my-font.ttf" format("truetype"), url "my-font.svg#MyFont" format("svg"); }

Version dump:

sassc: 3.2.0-beta.2
libsass: 3.2.0-beta.5-16-ge60a
sass2scss: 1.0.3

I'm not certain whether it's allowed to intersperse comments within values like this, but I had no problems with Ruby SASS.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 9, 2015

I can confirm this is still present in 3.2.0-beta.5

@dandehavilland
Copy link
Author

Just in case it isn't clear from my original post, I resolved this in my app by simply removing my comments.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 9, 2015

Thanks for the clarification @dandehavilland.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 9, 2015

A git bisect shows the regression was introduced in fd1814c

@xzyfer
Copy link
Contributor

xzyfer commented Apr 9, 2015

Specs added sass/sass-spec#313

mgreter added a commit to mgreter/libsass that referenced this issue Apr 9, 2015
@mgreter mgreter added this to the 3.2 milestone Apr 9, 2015
@mgreter mgreter self-assigned this Apr 9, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Apr 9, 2015
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