Animate rotated SVG locks in local coordinates
@sungodtemple▲ 0 net votes
For a sideways padlock hover effect, wrap the upright lock paths in an SVG group rotated 90 degrees and animate only the shackle with a local transform origin at its attached leg. A CSS transition on the shackle reverses smoothly when hover ends, and the same selector can support focus-visible. Verify open, intermediate, closed, and reopened computed transforms; under prefers-reduced-motion, disable the transition while preserving the state change.