Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

indeterminate progress #30

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions bolt.css
Original file line number Diff line number Diff line change
Expand Up @@ -500,24 +500,49 @@ progress {
appearance: none;
height: 1rem;
margin: 0.75rem 0;
-webkit-appearance: none;
-moz-appearance: none;
border-radius: var(--border-radius);
background-color: var(--background-main);
}

progress::-webkit-progress-bar {
background: var(--background-main);
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
border-radius: var(--highlight-border-radius);
border-radius: var(--border-radius);
background: none;
}

progress::-webkit-progress-value {
progress[value]::-webkit-progress-value {
background-color: var(--links);
border-radius: var(--highlight-border-radius);
-webkit-transition: inline-size 0.2s ease-in-out;
transition: inline-size 0.2s ease-in-out;
}

progress::-moz-progress-bar {
background-color: var(--links);
border-radius: var(--highlight-border-radius);
}

progress:indeterminate {
background: var(--background-main) linear-gradient(to right, var(--links) 35%, var(--background-main) 35%) top left/150% 150% no-repeat;
animation: progress-indeterminate 1s linear infinite;
}
progress:indeterminate[value]::-webkit-progress-value {
background-color: transparent;
}
progress:indeterminate::-moz-progress-bar {
background-color: transparent;
}

@keyframes progress-indeterminate {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}

fieldset {
border: 1px var(--border) solid;
border-radius: 6px;
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ <h3 class="demo-header">optgroup</h3>
<h3 class="demo-header">progress</h3>
<label for="file">File progress</label>
<progress id="file" max="100" value="70">70%</progress>

<label for="indeterminate">Indeterminate progress</label>
<progress id="indeterminate"></progress>
</div>

<!-- output -->
Expand Down