-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add stripdeclarations
option
#102
Add stripdeclarations
option
#102
Conversation
Add the option `stripdeclarions` to the loader. If given will tell the loader to strip out any XML declaration, e.g. <?xml version="1.0" encoding="UTF-8"?> at the beginning of imported SVGs. Added because Internet Explorer (tested in Edge 14) cannot handle XML declarations in CSS data URLs (`content: url("data:image/svg...")`).
Codecov Report
@@ Coverage Diff @@
## master #102 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 18 20 +2
Branches 4 5 +1
=====================================
+ Hits 18 20 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internet Explorer (tested in Edge 14) cannot handle XML
declarations in CSS data URLs
Is it documented somewhere? It will be nice to put a link about that in a README.
Otherwise this looks good for me. Thank you!
Can't find it anywhere, I was hoping caniuse would have it. Screenshots: |
@malthejorgensen, I also found nothing about support, but the screenshot perfectly shows that removing xml declaration indeed fixes icon under Edge. |
I don't know, you could be right – that it's a better default to always remove the declaration. I don't really have a good basis to make the decision on – I do like the ability to turn it off though. Most examples (if not all I've seen) do not include the XML declaration, however I don't know if it has any implication on e.g. encoding (which can be specified in the declaration) |
@malthejorgensen , I am opening a separate issue (#104) about making stripdeclaration the default behavior of the loader. |
Add the option
stripdeclarions
to the loader.If given will tell the loader to strip out any XML declaration, e.g.
at the beginning of imported SVGs.
Added because Internet Explorer (tested in Edge 14) cannot handle XML
declarations in CSS data URLs (
content: url("data:image/svg...")
).