3 ms·
Is there a proper alternative to CSS for sprite sheets yet?
by TazeTSchnitzel 7y ago
Is there a proper alternative to CSS for sprite sheets yet?
- SahAssar 7y agoUsing SVG fragment identifiers seems to be the "modern way" https://caniuse.com/#feat=svg-fragment https://caniuse.com/#feat=svg-fragment
- TazeTSchnitzel 7y agoAh, wonderful! I remember there was some proposal to let # specify a part of a bitmap some years ago but it didn't take off, but that SVG supports it (in a better way) is great! Edit: The thing I was thinking of was Media Fragments, apparently that has some browser support at least, but not for images? Hrm. You could put a PNG inside an SVG but that seems silly.
- SahAssar 7y agoYeah, Media Fragments is basically only implemented for partitioning videos based on time, not slicing bitmaps. Putting a PNG/JPEG inside a SVG can be a valid strategy at times, but if you are using primarily bitmap sprites then the traditional way of positioning/clipping backgrounds is probably best.