Skip to content

Commit

Permalink
fix svg progress circle browser compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Mar 18, 2023
1 parent 22ad67d commit 430ddc1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3440,24 +3440,24 @@ svg {
}

.base {
cx: calc(var(--diam) / 2);
cy: calc(var(--diam) / 2);
r: calc(var(--diam) / 2 - var(--stroke));
cx: calc(var(--diam) / 2 * 1px);
cy: calc(var(--diam) / 2 * 1px);
r: calc((var(--diam) / 2 - var(--stroke)) * 1px);
fill: none;
stroke: #e6e6e6;
stroke-width: var(--stroke);
}

.percent {
cx: calc(var(--diam) / 2);
cy: calc(var(--diam) / 2);
r: calc(var(--diam) / 2 - var(--stroke));
cx: calc(var(--diam) / 2 * 1px);
cy: calc(var(--diam) / 2 * 1px);
r: calc((var(--diam) / 2 - var(--stroke)) * 1px);
fill: none;
stroke: #186ddd;
stroke-width: var(--stroke);
stroke-dasharray: 100;
stroke-linecap: round;
stroke-dashoffset: calc(100 - var(--val));
stroke-dashoffset: calc((100 - var(--val)) * 1px);
}

.p50 {
Expand Down
2 changes: 1 addition & 1 deletion css/index.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/index.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/index.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<div class="item s box">A</div>
<div class="item s rounded">N</div>
<div class="item l">
<svg >
<svg>
<circle class="base" />
<circle class="percent p50" pathLength="100" />
</svg>
Expand Down
14 changes: 7 additions & 7 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -379,23 +379,23 @@ svg {
}

.base {
cx: calc(var(--diam) / 2);
cy: calc(var(--diam) / 2);
r: calc(var(--diam) / 2 - var(--stroke));
cx: calc(var(--diam) / 2 * 1px);
cy: calc(var(--diam) / 2 * 1px);
r: calc((var(--diam) / 2 - var(--stroke)) * 1px);
fill: none;
stroke: #e6e6e6;
stroke-width: var(--stroke);
}
.percent {
cx: calc(var(--diam) / 2);
cy: calc(var(--diam) / 2);
r: calc(var(--diam) / 2 - var(--stroke));
cx: calc(var(--diam) / 2 * 1px);
cy: calc(var(--diam) / 2 * 1px);
r: calc((var(--diam) / 2 - var(--stroke)) * 1px);
fill: none;
stroke: #186ddd;
stroke-width: var(--stroke);
stroke-dasharray: 100;
stroke-linecap: round;
stroke-dashoffset: calc(100 - var(--val));
stroke-dashoffset: calc((100 - var(--val)) * 1px);
}

.p50 {
Expand Down

0 comments on commit 430ddc1

Please sign in to comment.