Skip to content

Commit

Permalink
Fix arbitrary angle-* position. Closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Aug 29, 2024
1 parent a120c55 commit eec591a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scss/_progress.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

o-progress {
container-name: oprogress;
--o-angle-composite: var(--o-angle) * var(--o-orbit-child-number) * var(--o-direction, 1);
r: var(--o-radius);
stroke-width: calc(var(--o-radius) / (var(--o-orbit-number) + var(--o-initial-orbit, 0)) * var(--o-size-ratio, 1));
transform: rotate(var(--o-from));
transform: rotate(calc(var(--o-from) + var(--o-angle-composite)));
position: absolute;
display: flex;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions src/scss/_slice.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

o-slice {
--o-angle-composite: var(--o-angle) * var(--o-orbit-child-number) * var(--o-direction, 1);
//--o-angle-composite: (var(--o-angle) * var(--o-orbit-child-number) var(--o-offset, + 90deg)) * var(--o-direction, 1);
--o-gap: 1;
container-name: oslice;
display: flex;
Expand Down
5 changes: 5 additions & 0 deletions src/scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ $max-grade: 360;
--o-angle-composite: calc(#{$i}deg - 90deg) !important;
}
}
@for $i from 0 through $max-grade {
o-slice.angle-#{$i}, o-progress.angle-#{$i}, o-text.angle-#{$i} {
--o-angle-composite: calc(#{$i}deg) !important;
}
}

/*
Sector, Progress and Vector utilities
Expand Down

0 comments on commit eec591a

Please sign in to comment.