Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Wrong image sprite paths #311

Closed
andersrosten opened this issue May 20, 2014 · 5 comments
Closed

Wrong image sprite paths #311

andersrosten opened this issue May 20, 2014 · 5 comments

Comments

@andersrosten
Copy link

I'm using WebEssentials and SASS to generate image sprites, and is having problems with the resulting paths to the generated sprite .png files. WebEssentials is using node for compiling .scss files and Adeel Mujahid which wrote this comment to my WebEssentials issue:

madskristensen/WebEssentials2013#1084

WE uses following node command for compiling SCSS:

node node-sass --source-map c:/path/to/output/file.css.map --output-style=expanded c:/path/to/input/file.scss --output c:/path/to/output/file.css

The problem is; SASS compiler is not fixing the image URLs from imported document in the resultant CSS. Instead, its pasting them as is. For correct behavior, compare with LESS compiler.

Please report this bug at node-sass repository https://github.com/andrew/node-sass.

@LaurentGoderre
Copy link
Contributor

This is the behavior that sass uses so perhaps it needs to be filed with the sass project.

@LaurentGoderre
Copy link
Contributor

Hey, here is a related issue. sass/sass#1015

Given that it's the defined behavior of the language I don't think we can fix

@am11
Copy link
Contributor

am11 commented May 20, 2014

Stylus has --resolve-url switch. We can implement similar switch in node package which would auto-fix the URLs in resultant CSS file (post-processing). It would suffice both needs; sanity and language specs. :)

BTW, in lessc, they have --relative-urls switch. If you don't want it to resolve your URLs, just drop that switch from command. So I don't agree with the guy claiming he stopped using LESS because it auto resolve URLs..

@michaek
Copy link

michaek commented Sep 3, 2014

@LaurentGoderre @am11 Do you think we should remove the wontfix label or close this issue? I don't think this is a make-or-break feature, and I'm not sure it would belong in node-sass if it was.

@am11
Copy link
Contributor

am11 commented Oct 22, 2014

Couple of changes have been made since. In WE, we are moved to code based usage (as opposed to CLI).

Secondly auto-curating url() paths w.r.t the location of generated CSS is a feature request opened in libsass' issue tracker: sass/libsass#532.

@am11 am11 closed this as completed Oct 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants