Skip to content

Commit

Permalink
round progress indicators (not quite spec but closer)
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow committed Jan 19, 2024
1 parent 0b654cd commit 7d1afa6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/lib/forms/CircularProgress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
stroke="rgb(var(--m3-scheme-primary))"
stroke-width="4"
stroke-dasharray="125.66 125.66"
stroke-linecap="round"
fill="none"
/>
</svg>
Expand Down
1 change: 1 addition & 0 deletions src/lib/forms/CircularProgressIndeterminate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
stroke="rgb(var(--m3-scheme-primary))"
stroke-width="4"
stroke-dasharray="125.66 125.66"
stroke-linecap="round"
fill="none"
/>
</svg>
Expand Down
10 changes: 4 additions & 6 deletions src/lib/forms/LinearProgress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@

<style>
:root {
--m3-linear-progress-track-shape: var(--m3-util-rounding-none);
--m3-linear-progress-indicator-shape: var(--m3-util-rounding-none);
--m3-linear-progress-shape: var(--m3-util-rounding-full);
}
.m3-container {
background-color: rgb(var(--m3-scheme-surface-container-highest));
background-color: rgb(var(--m3-scheme-primary-container));
height: 0.25rem;
min-width: 8rem;
position: relative;
overflow: hidden;
border-radius: var(--m3-linear-progress-track-shape);
border-radius: var(--m3-linear-progress-shape);
}
.percent {
background-color: rgb(var(--m3-scheme-primary));
transition: all 200ms;
border-radius: var(--m3-linear-progress-indicator-shape);
border-radius: var(--m3-linear-progress-shape);
}
.m3-container {
Expand Down
9 changes: 4 additions & 5 deletions src/lib/forms/LinearProgressIndeterminate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@

<style>
:root {
--m3-linear-progress-track-shape: var(--m3-util-rounding-none);
--m3-linear-progress-indicator-shape: var(--m3-util-rounding-none);
--m3-linear-progress-shape: var(--m3-util-rounding-full);
}
.m3-container {
background-color: rgb(var(--m3-scheme-surface-container-highest));
background-color: rgb(var(--m3-scheme-primary-container));
height: 0.25rem;
min-width: 8rem;
position: relative;
overflow: hidden;
border-radius: var(--m3-linear-progress-track-shape);
border-radius: var(--m3-linear-progress-shape);
}
.percent {
background-color: rgb(var(--m3-scheme-primary));
animation: progress infinite 1.5s ease-out;
border-radius: var(--m3-linear-progress-indicator-shape);
border-radius: var(--m3-linear-progress-shape);
width: 50%;
top: 0;
bottom: 0;
Expand Down

0 comments on commit 7d1afa6

Please sign in to comment.