To automatically assemble a huge sprite and emit the offsets is also easy.
Game engines has done this for almost 20 years.
Game engines has done this for almost 20 years.
I'm also wondering if, to correctly emit the offsets in CSS attributes in all cases, you'll require some manually inserted placeholders.