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

Support for site root-relative paths with the data-uri function? #1634

Closed
Nettsentrisk opened this issue Nov 4, 2013 · 6 comments
Closed

Comments

@Nettsentrisk
Copy link

As far as I can tell, less.js doesn't currently support the use of site root-relative paths (e.g., "/images/image.png") within LESS files with the data-uri function, which requires access to the file to base64-encode it. (This problem may apply to other areas as well.)

There are currently no tests for the data-uri function that use a site root-relative path, though I understand this might be due to practical reasons.

@SLaks
Copy link
Contributor

SLaks commented Jan 15, 2014

The problem is that the LESS command-line compiler doesn't know what the site root is.

@Nettsentrisk
Copy link
Author

Is there a way to pass this to the compiler as an argument or something like that?

@SLaks
Copy link
Contributor

SLaks commented Jan 15, 2014

There is a --source-map-basepath option, which may be related.

@Nettsentrisk
Copy link
Author

Any movement on this front? :)

@dminkovsky
Copy link

The problem is that the LESS command-line compiler doesn't know what the site root is.

@SLaks you can specify include paths. Could resolve relative to any of those, like imports.

@lukeapage lukeapage added the 2.0 label May 11, 2014
@jonschlinkert jonschlinkert added this to the 2.0.0 milestone Aug 27, 2014
SomMeri pushed a commit to SomMeri/less-rhino.js that referenced this issue Jan 12, 2015
SomMeri pushed a commit to SomMeri/less-rhino.js that referenced this issue Jan 13, 2015
@SomMeri
Copy link
Member

SomMeri commented Jan 13, 2015

Fixed by previous commit. Data uri function now uses paths specified through include-path command line option. Programmatic equivalent is property paths.

@SomMeri SomMeri closed this as completed Jan 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants