Skip to content

Commit

Permalink
Trying to match progress canvas look on progress ring
Browse files Browse the repository at this point in the history
  • Loading branch information
yourWaifu committed Mar 26, 2024
1 parent 8deabc7 commit c236f29
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions mocha.css
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ body {
}

#mocha-stats {
--ring-size: 40px;
--ring-container-size: 40px;
--ring-size: 39px;
--ring-radius: calc(var(--ring-size) / 2);

position: fixed;
Expand All @@ -349,15 +350,15 @@ body {
}

#mocha-stats :is(.progress-element, .progress-text) {
width: var(--ring-size);
width: var(--ring-container-size);
display: block;
top: 12px;
position: absolute;
}

#mocha-stats .progress-element {
visibility: hidden;
height: calc(var(--ring-size) / 2);
height: calc(var(--ring-container-size) / 2);
}

#mocha-stats .progress-text {
Expand All @@ -369,14 +370,15 @@ body {
}

#mocha-stats .progress-ring {
width: var(--ring-size);
height: var(--ring-size);
width: var(--ring-container-size);
height: var(--ring-container-size);
}

#mocha-stats :is(.ring-flatlight, .ring-highlight) {
--stroke-thickness: 1px;
cx: var(--ring-radius);
cy: var(--ring-radius);
--stroke-thickness: 1.65px;
--center: calc(var(--ring-container-size) / 2);
cx: var(--center);
cy: var(--center);
r: calc(var(--ring-radius) - calc(var(--stroke-thickness) / 2));
fill: hsla(0, 0%, 0%, 0);
stroke-width: var(--stroke-thickness);
Expand Down

0 comments on commit c236f29

Please sign in to comment.