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

Idea/feature request: cache SVGs with gradients #117

Closed
bavarianbytes opened this issue Feb 7, 2023 · 6 comments
Closed

Idea/feature request: cache SVGs with gradients #117

bavarianbytes opened this issue Feb 7, 2023 · 6 comments

Comments

@bavarianbytes
Copy link

Seems like SVGs are not stored as symbols if there is a <linearGradient> in the SVG file. SvgStoreService.php skips the file if url is found (<linearGradient>s are used to fill shapes via fill="url(#myGradientId)").

A solution seems to be to place <linearGradient>s in a <defs> part outside of the <symbol>: https://stackoverflow.com/questions/52439187/linear-gradient-in-svg-symbol/52443861#52443861

@bavarianbytes
Copy link
Author

Thx, i'll try.

@xerc
Copy link
Contributor

xerc commented Oct 8, 2023

@bavarianbytes is browser support sufficient nowadays?

@bavarianbytes
Copy link
Author

Browser support looks good: https://caniuse.com/?search=lineargradient

@bavarianbytes bavarianbytes reopened this Oct 9, 2023
@xerc
Copy link
Contributor

xerc commented Oct 9, 2023

Chrome & Safari are still buggy ; https://xerc.de/test.htm

@bavarianbytes
Copy link
Author

Ok, caniuse didn't told that. Then maybe wait till support is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants