icon: Keep symbol viewBox value when register an iconSet
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
When registering an SVG iconSet, every symbol may provide a custom viewBox
attribute. This attribute should be keep in the newly SVG element created.
What is the current behavior?
The viewBox
attribute is swallowed.
What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
At least since beta 7
Is there anything else we should know?
This is related to #5188 #2981
For SVG icon set with symbol
, see https://css-tricks.com/svg-symbol-good-choice-icons/
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:11 (3 by maintainers)
Top Results From Across the Web
icon: Keep symbol viewBox value when register an iconSet ...
When registering an SVG iconSet, every symbol may provide a custom viewBox attribute. This attribute should be keep in the newly SVG element ......
Read more >SVG Viewport and viewBox (For Complete Beginners)
In this quick SVG viewport and viewBox tutorial, we're going to break down exactly what viewport and viewBox are in SVG for the...
Read more >viewBox - SVG: Scalable Vector Graphics - MDN Web Docs
The viewBox attribute defines the position and dimension, in user space, of an SVG viewport. The value of the viewBox attribute is a...
Read more >Inline SVG icons not displaying in viewbox - Stack Overflow
Load it into a browser and use getBBox() to find the correct values for the viewBox.
Read more >Using SVG Icons Components in React - Leapfrog Technology
TL;DR: We create a single SVG component and pass a name prop to it. The component resolves the viewBox and path values associated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I still do not understand why this 3-lines patch is not applied?
Potentially revisiting this now