Description
Description
When a custom icon for a given ID (such as technology
) is set in theme-settings.json
, the icon is embedded in the rendered page via SVG's <use/>
element. This runs afoul of WebKit bugs which prevent non-trivial SVGs from rendering properly when embedded this way.
Checklist
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
I expect using a custom icon to allow for the full range of SVG features.
Actual behavior
As the custom icon is embedded via <use/>
instead of being referenced directly or embedded verbatim, various WebKit bugs (see below) prevent using even "basic" SVG features like <linearGradient>
or embedded <style>
.
https://bugs.webkit.org/show_bug.cgi?id=258225
https://bugs.webkit.org/show_bug.cgi?id=65344
https://bugs.webkit.org/show_bug.cgi?id=104169
https://bugs.webkit.org/show_bug.cgi?id=179724
https://bugs.chromium.org/p/chromium/issues/detail?id=109212
Steps To Reproduce
- Visit https://api.vapor.codes/sqlitenio/documentation/sqlitenio/
- Compare to the actual SVG.
- Notice that the stroke gradient on the top "leaf" shape is only applied when accessing the SVG directly.
(Note: Numerous variations, such as using <defs>
, <g>
, etc. were tried; none worked.)