Hacker News new | ask | show | jobs
by panstromek 692 days ago
Well, there's still a compromise to be fair. It's defintely more work to manage these sprites and it's especially annoying when there's more than one state. I think it's possible to write some tool to automate it, but I haven't found one.
1 comments

There are preprocessors that will do this. Conceptually, we would:

  include sprite-1.snippet
  include sprite-2.snippet
and it would write the defs into the page. Then later in the page, `<use>` the defs you included.