Replies: 14 comments
-
Hmmm.... It looks like it still doesn't work in Safari. And Ubuntu doesn't seem to natively support it - either in EOM or file thumbnails. I think we need to bring it back, for better compatibility. Or will that take any tiny SVG over the limit? |
Beta Was this translation helpful? Give feedback.
-
Most Linux viewers use Librsvg. The question is if we continue this as a web first iconset. Question about Safari, can you find somebody with a macintosh computer to check how things are in real life with last Safari version? |
Beta Was this translation helpful? Give feedback.
-
Safari Version 12.0.3 (13606.4.5.3.1) - these icons are broken |
Beta Was this translation helpful? Give feedback.
-
Ok, xlink would it be... |
Beta Was this translation helpful? Give feedback.
-
Yes, I think we need to add them back in. Will work for some of the icons - but others will be too large. |
Beta Was this translation helpful? Give feedback.
-
This would add 49 bytes if href is used once, and 6 more bytes for each subsequent use. I agree it should be done, probably for all of them for consistency even if href isn't used in the file. (However, ré DuckDuckGo... 😭) |
Beta Was this translation helpful? Give feedback.
-
@edent can you check if adding namespace prefix works without namespace declaration is Safari? |
Beta Was this translation helpful? Give feedback.
-
Just adding the namespace does not work. Best I can do is So that's an extra 39 bytes for the namespace, and an extra 2 for each use. Not terrible. |
Beta Was this translation helpful? Give feedback.
-
I'll switch all uses of unnamespaced href to x: |
Beta Was this translation helpful? Give feedback.
-
Thanks :-) |
Beta Was this translation helpful? Give feedback.
-
Ah, there's a problem. |
Beta Was this translation helpful? Give feedback.
-
For as long as we do "web first," I see no issue there. Hardcoded namespaces are, well, hardcoded namespaces... |
Beta Was this translation helpful? Give feedback.
-
I think you're probably right. Just makes it a pain when generating the Android Vectors. Oh well! |
Beta Was this translation helpful? Give feedback.
-
When SVG is parsed with the HTML parser (which mostly means: when you use inline SVG), I extremely strongly recommend migrating back from x to xlink. |
Beta Was this translation helpful? Give feedback.
-
XML preamble
xlink:
and namespace declarationxmlns:xlink="http://www.w3.org/1999/xlink"
is no longer needed in every web renderer these days. https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/hrefThis has been a proposal since SVG 1.2, and this is why some renders not explicitly supporting 2.0 has its support.
Instead of
<use x="-19" y="170" xlink:href="#o"/>
you can simply use<use x="-19" y="170" href="#o"/>
Support in browsers is certainly there, but I can't say so for offline renderers. Librsvg doesn't seem to do it despite having most complete 1.2 support of all offline renderers.
Beta Was this translation helpful? Give feedback.
All reactions