AX
Thanks! Performance-wise I didn’t benchmark them against each other, since scaleX and translateX are both compositor-only transforms, so neither triggers layout. The cap shape was the deciding factor: with scaleX + transform-origin: left, the border-radius gets scaled along with the bar, so when the bar is short the rounded ends get squashed. Translating a full-width bar inside an overflow-hidden container keeps the corners intact for free. If I ever needed scaleX, I think the usual workaround is to scale a plain inner element and draw the rounded caps separately, but the clipped version was simpler here.