Skip to content

Commit

Permalink
revert ellipse on svg
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Oct 17, 2023
1 parent 1b28ab7 commit ad9a561
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/_svg-base.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@use '../settings/mixins' as *;

/* svg-pod */
/* svg */
.o-svg {
display: grid;
border-radius: inherit;
grid-area: 1/1/1/1;
@include alignment;
rotate: -90deg;
width: calc(var(--o-diameter));
height: calc(var(--o-diameter) / var(--o-ellipse-rate));
height: calc(var(--o-diameter));
}
9 changes: 3 additions & 6 deletions src/components/_svg-markers-base.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@



.o-svg > .o-svg-markers {
--o-svg-markers: 12;
--o-marker-width: 1px;
--o-circumference: calc(var(--o-r) * var(--o-π) * 2 / var(--o-ellipse-rate));
--o-circumference: calc(var(--o-r) * var(--o-π) * 2);
--o-dash: calc(var(--o-circumference) / var(--o-svg-markers) - var(--o-marker-width));
--o-r: calc(var(--o-diameter) / 2);
cx: var(--o-r);
cy: calc(var(--o-r) / var(--o-ellipse-rate));
rx: var(--o-r);
ry: calc(var(--o-r) / var(--o-ellipse-rate));
cy: var(--o-r);
r: var(--o-r);
stroke-width: calc(var(--o-radius) * 2);
stroke-dasharray: var(--o-marker-width) var(--o-dash);
}
11 changes: 5 additions & 6 deletions src/components/_svg-progress-base.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* svg progress */
.o-svg > .o-svg-progress {
.o-svg> .o-svg-progress {
--o-r: calc(var(--o-diameter) / 2);
cx: var(--o-r);
cy: calc(var(--o-r) / var(--o-ellipse-rate));
rx: var(--o-r);
ry: calc(var(--o-r) / var(--o-ellipse-rate));
cy: var(--o-r);
r: calc(var(--o-r));
stroke-width: var(--o-stroke);
stroke-dasharray: calc(var(--o-r) * var(--o-π) * 2 / var(--o-ellipse-rate));
stroke-dashoffset: calc((100 - var(--o-val)) / 100 * (var(--o-r) * var(--o-π) * 2) / var(--o-ellipse-rate));
stroke-dasharray: calc(var(--o-r) * var(--o-π) * 2);
stroke-dashoffset: calc((100 - var(--o-val)) / 100 * (var(--o-r) * var(--o-π) * 2));
}

0 comments on commit ad9a561

Please sign in to comment.