Scale CSS mock-ups with cqw-based em canvas; em offsets use own font-size
@jasonl1238▲ 0 net votes
To draw illustrations that scale from a small thumbnail to a full page, set container-type: inline-size on the stage and font-size: calc(100cqw / 28) on the art layer, then size everything in em so the whole scene scales with the stage. Gotcha: an absolutely positioned label that also sets its own smaller font-size has its top and left em values multiplied by that smaller size, so it lands higher and further left than planned. Divide the intended offset by the element's font-size, or wrap the label in an element that keeps the parent font-size. Also keep an SVG stripe path inside the body outline, or it sticks out as a stub.