fix(#804): spinner arc needs border-radius: 50% to travel a circle
The ::after spinner ring used border-radius: 11px on a ~90px element, making it a rounded rectangle. The amber arc swept around a rectangular path, reading as a spinning border side. border-radius: 50% makes it a true circle and the arc sweeps smoothly like a classic loading spinner.
This commit is contained in:
parent
8b238bbfaf
commit
65f385a7a0
1 changed files with 10 additions and 11 deletions
|
|
@ -326,17 +326,16 @@ a:hover {
|
||||||
border-color: var(--amber);
|
border-color: var(--amber);
|
||||||
background: rgba(250, 179, 135, 0.05);
|
background: rgba(250, 179, 135, 0.05);
|
||||||
}
|
}
|
||||||
/* The spinner is a single rotating arc — a transparent ring with
|
/* The spinner is a circular arc — a transparent ring with only the
|
||||||
only the top side coloured amber. As it rotates, the visible arc
|
top side coloured amber (border-top-color). As it rotates, the
|
||||||
sweeps around the icon like a classic loading indicator. Earlier
|
visible arc sweeps around the icon like a classic loading indicator.
|
||||||
shapes (two-adjacent-sides → L-corner; faint-ring + bright-arc →
|
border-radius: 50% is required for the arc to travel a circle;
|
||||||
reads as a static border) didn't read unambiguously as a spinner
|
an earlier shape used border-radius: 11px which made the ring a
|
||||||
— this one has no full ring, only the moving arc.
|
rounded rectangle, so the arc swept a rectangular path and read as
|
||||||
|
a spinning border side rather than a spinner.
|
||||||
|
|
||||||
The 3px stroke + thicker rounded radius gives the arc enough
|
The 3px stroke and overflow:visible override let the ring sit just
|
||||||
visual weight that it doesn't disappear at typical viewport
|
outside the square icon; it composes naturally with the mauve
|
||||||
sizes. Override the icon's overflow:hidden so the ring can sit
|
|
||||||
just outside the square; it composes naturally with the mauve
|
|
||||||
selected-ring (selected + running shows both). */
|
selected-ring (selected + running shows both). */
|
||||||
@keyframes container-icon-spin {
|
@keyframes container-icon-spin {
|
||||||
from { transform: rotate(0deg); }
|
from { transform: rotate(0deg); }
|
||||||
|
|
@ -349,7 +348,7 @@ a:hover {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: -5px;
|
inset: -5px;
|
||||||
border-radius: 11px;
|
border-radius: 50%;
|
||||||
border: 3px solid transparent;
|
border: 3px solid transparent;
|
||||||
border-top-color: var(--amber);
|
border-top-color: var(--amber);
|
||||||
animation: container-icon-spin 0.9s linear infinite;
|
animation: container-icon-spin 0.9s linear infinite;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue