You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the radius for the track is calculated the wrong way:
Current calculation: calc(var(--size) / 2 - var(--track-width) * 2)
Notice that the track width is subtracted twice. However, it should actually be subtracted 0.5 times. Changing the formula to calc(var(--size) / 2 - var(--track-width) * 0.5) fixes the described bug.
The text was updated successfully, but these errors were encountered:
Xyz3R
changed the title
Progress Ring Radius calculation: High track-width results in ring getting smaller
Progress Ring radius calculation: High track-width results in ring getting smaller
Jan 24, 2022
Describe the bug
The progress ring gets smaller with increasing track-width values. At some point it disappears completely.
To Reproduce
Use a high --track-width on a progress ring.
Demo
https://codepen.io/xyz3r/pen/yLPBzBL?editors=1000
Screenshots
see codepen.
Browser / OS
Additional information
I found that the radius for the track is calculated the wrong way:
Current calculation:
calc(var(--size) / 2 - var(--track-width) * 2)
Notice that the track width is subtracted twice. However, it should actually be subtracted 0.5 times. Changing the formula to
calc(var(--size) / 2 - var(--track-width) * 0.5)
fixes the described bug.The text was updated successfully, but these errors were encountered: