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

if() inside of url() returns error #245

Closed
derek73 opened this issue Jan 12, 2014 · 4 comments
Closed

if() inside of url() returns error #245

derek73 opened this issue Jan 12, 2014 · 4 comments

Comments

@derek73
Copy link

derek73 commented Jan 12, 2014

This scss returns an error from libsass (sassc) but works with the ruby version.

a { background-image: url(if(true, 'red.png', 'white.png'));}

returns

error: non-terminal statement or declaration must end with ';'

It should return

a {
  background-image: url("red.png"); }

As a workaround, putting the url() inside the if() works.

a { background-image: if(true, url('red.png'), url('white.png'))}

I ran into this while trying to compile Twitter's official Sass port of Bootstrap

@derek73
Copy link
Author

derek73 commented Jan 12, 2014

The issue may be with any function inside the url(), for example:

url(twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot')

returns the same error.

@glebm
Copy link
Contributor

glebm commented Jan 12, 2014

Same as #231

@derek73
Copy link
Author

derek73 commented Jan 12, 2014

agree, this issue is a dup then. thx

@akhleung
Copy link

Closing this since it's a dup of #231.

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