Open
Description
The SVG inlining features of md-icon are more generally useful than for just displaying icons. We should refactor the code such that:
- The SVG portions of
MdIconRegistry
are moved toIconRegistry
in the cdk, withMdIconRegistry
then extendingIconRegistry
- The SVG inlining code in
md-icon
is moved intocdk-svg
withmd-icon
then consumingcdk-svg
.
This will enable us to add additional APIs to cdk-svg
around customizing viewBox
and preserveAspectRatio
(see https://css-tricks.com/scale-svg)
Notes:
- Part of this should be moving SVG parsing (i.e.
string
->SVGElement
) into its own utility that can be mocked. This will be useful when ensuring that parsing only happens when expected (since it can have performance impacts if overdone).