You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The external-svg-sprite-loader module addresses the individual images by doing math and resizing for the images. This (among other things) also distorts the image proportion when the image is rendered without width/height attributes of e.g. <img src="...#view-xyz"/>.
FYI, there is an alternative (and probably simpler) approach used by svg-sprite-loader:
There is no math/resizing here, and also we can see that all the images render at (0, 0) with their native width and height; the images are invisible due to .sprite-symbol-usage class.
But when the sprite file is addressed as e.g. <img src="sprite.svg#view-img2"/>, then, due to :target pseudo-class, the selected <use/> becomes visible.
The external-svg-sprite-loader module addresses the individual images by doing math and resizing for the images. This (among other things) also distorts the image proportion when the image is rendered without width/height attributes of e.g.
<img src="...#view-xyz"/>
.FYI, there is an alternative (and probably simpler) approach used by svg-sprite-loader:
There is no math/resizing here, and also we can see that all the images render at (0, 0) with their native width and height; the images are invisible due to .sprite-symbol-usage class.
But when the sprite file is addressed as e.g.
<img src="sprite.svg#view-img2"/>
, then, due to :target pseudo-class, the selected<use/>
becomes visible.P.S.
The full demo:
a.svg:
a.html:
The text was updated successfully, but these errors were encountered: