-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
data-uri won't accept fragment identifiers in URLs #1959
Labels
Comments
Thanks, whats the fragment used for? (just because I haven't come across it myself) |
It is needed everywhere CSS and SVG join forces: masks, clipping paths, filters, ... For instance:
Then in CSS:
|
Ok, we should fix it then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, so this issue appears not to have been reported before. I'm using
grunt-contrib-less
v0.10 which uses LESS v1.6 behind the scene. This issue won't happen in the browser since data-uri won't try to resolve the file path in that case, thus I'm unable to reproduce it in less2css.org, sorry.I'm using SVG filters for a project and, rather than embedding the SVG definitions in the HTML, I'd rather inline it in the CSS. Like so:
I tried using data-uri, like so:
but the pre-processor stops with a "File not found" error. The solution I suppose would be to:
1 detect if there's a fragment identifier in
filePathNode
2 save it for later and truncate the value accordingly
3 process as usual
4 append the fragment ID to the generated URI
I will try to find time to update the code by myself but I'm quite in a hurry right now, at least I wanted to report the issue.
The text was updated successfully, but these errors were encountered: