Overview
The classic CSS border-trick spinner: a square with border-radius: 50% becomes a ring, and giving one side a colored border (the other three transparent) produces a quarter-segment that rotates. Extends naturally into dual-ring counter-rotations and two-tone halves variants without adding any new mechanism — just more border manipulation.
When to use it
Reach for border-trick spinners when you need a spinner that works in legacy browsers without conic-gradient support (back to Chrome 4, Safari 5). Skip the dual-ring variant inside small UI — the inner counter-rotation is lost below ~24px diameter. Skip border-trick entirely if you have flexible color stops; conic-gradient produces tapered ends that read more refined.
How it works
Set the element to a fixed square size (e.g. 32px x 32px), apply border: 3px solid transparent; border-top-color: var(--accent); border-radius: 50% and rotate it with animation: spin 1s linear infinite. The result is a ring with a single visible quarter-arc rotating. For dual rings, nest a second spinner inside with the opposite animation-direction: reverse. For the two-tone halves variant, set two adjacent border sides to different colors so the rotating arc reads as complementary halves rather than a single tail.
Production gotchas
The border-trick spinner ages well in legacy browsers but cannot produce gradient or tapered tail ends; if your design needs those, reach for SVG or conic-gradient instead. Sub-pixel border widths produce jagged edges on non-retina displays — stick to integer pixel values. Animations stutter when the spinner is rendered inside an overflow: hidden ancestor with a transformed sibling because of compositor layer promotion races; add transform: translateZ(0) on the spinner to force its own layer.
Accessibility
Pair with role="status" + aria-label like the conic spinner. Under prefers-reduced-motion: reduce drop the animation entirely and replace with a static loading-shape SVG so the visual signal remains. The spinner color should hit at least 3:1 contrast against the background or it disappears for low-vision users.
References
Implementation depth
Border-ring spinners rely on simple geometry: a circular box, side-specific border colors, and rotation. Pseudo-elements can add counter-rotating layers without adding extra DOM.
Watch border thickness at small sizes. A ring that looks crisp at 48px can collapse at 16px, so test dense UI sizes and provide reduced motion that shows a static ring rather than a blank gap.