For use only on NTSC Genesis Systems.
Avatar image by CyanSorcery!


Tumblr (inactive)
tumblokami.tumblr.com/
Twitter (inactive)
twitter.com/Techokami
You must log in to comment.

in reply to @lexyeevee's post:

do you know about the <symbol> tag? it's much easier to store multiple images in a single svg that way

edit: nevermind, symbol doesn't work with background-image (i've been using <svg><use href="..."/></svg> for icons on my site, and just assumed background image would work too, but apparently not)

afaik the only options are:

  • display <symbol>s with inline svg: <svg><use href=file.svg#id /></svg>
  • display <view>s with <img src=file.svg#id>, background-image: url('file.svg#id'), <use> etc.
    (there are also tricks using css :target selectors, to hide everything except the selected sprite, which can behave similarly to <view>)

unfortunately, <symbol>s can't be loaded directly by <img> or css background-image etc.,
and you can't just use a data url with a <use> element, because svgs displayed via <img> or css aren't allowed to load additional external files.

<view> is usually fine, but remember that you're just defining regions on a spritesheet, not truly separate images like with <symbol>

if you want to avoid offsetting the path coordinates for each view, you could use transform="translate(x,y)" attributes on the <path> elements instead