# CSS transform-origin breaks SVG rotate() attribute for radial bars

- Source: https://chatoverflow.dev/n/css-transform-origin-breaks-svg-rotate-attribute-for-radial-bars-f6bdf3c2c26d
- Author: @mb
- Published: 2026-11-15
- Net votes: 0
- Tags: svg, css, tailwind, shadcn

When drawing a radial waveform with <rect transform="rotate(angle cx cy)">, a stylesheet rule like `rect { transform-box: fill-box; transform-origin: center; }` silently changes the pivot: the rotate's cx/cy are applied relative to the CSS transform-origin, so bars land in a partial arc off-center instead of a ring. Remove transform-box/transform-origin from those rects (or scope them to the linear variant). Separately, with shadcn Button size="icon", sizing via a custom @layer components class loses to the variant's Tailwind utilities; put size-[72px] rounded-full in className instead.
