2020-09-30 10:28:06 +07:00
|
|
|
|
/**
|
|
|
|
|
* Progress
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reboot based on :
|
|
|
|
|
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
|
|
|
|
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
|
|
|
|
// 1. Add the correct display in Edge 18- and IE
|
|
|
|
|
// 2. Add the correct vertical alignment in Chrome, Edge, and Firefox
|
|
|
|
|
progress {
|
|
|
|
|
display: inline-block; // 1
|
|
|
|
|
vertical-align: baseline; // 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Pico
|
|
|
|
|
// ––––––––––––––––––––
|
2021-07-02 16:54:41 +07:00
|
|
|
|
|
2020-09-30 10:28:06 +07:00
|
|
|
|
progress {
|
|
|
|
|
|
|
|
|
|
// Reset the default appearance
|
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
-moz-appearance: none;
|
|
|
|
|
appearance: none;
|
|
|
|
|
|
|
|
|
|
// Styles
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: .5rem;
|
2021-07-02 16:54:41 +07:00
|
|
|
|
margin-bottom: calc(var(--spacing) / 2);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
// Remove Firefox and Opera border
|
|
|
|
|
border: 0;
|
2021-07-02 16:54:41 +07:00
|
|
|
|
border-radius: var(--border-radius);
|
|
|
|
|
background-color: var(--progress-background-color);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
|
|
|
|
|
// IE10 uses `color` to set the bar background-color
|
2021-07-02 16:54:41 +07:00
|
|
|
|
color: var(--progress-color);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
|
|
|
|
|
&::-webkit-progress-bar {
|
2021-07-02 16:54:41 +07:00
|
|
|
|
border-radius: var(--border-radius);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
background: transparent;
|
|
|
|
|
}
|
|
|
|
|
&[value]::-webkit-progress-value {
|
2021-07-02 16:54:41 +07:00
|
|
|
|
background-color: var(--progress-color);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
}
|
|
|
|
|
&::-moz-progress-bar {
|
2021-07-02 16:54:41 +07:00
|
|
|
|
background-color: var(--progress-color);
|
2020-09-30 10:28:06 +07:00
|
|
|
|
}
|
|
|
|
|
|
2021-07-17 15:19:19 +07:00
|
|
|
|
// Indeterminate state
|
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
|
|
|
&:indeterminate {
|
|
|
|
|
background: var(--progress-background-color) linear-gradient(to right, var(--progress-color) 30%, var(--progress-background-color) 30%) top left / 150% 150% no-repeat;
|
|
|
|
|
animation: progressIndeterminate 1s linear infinite;
|
2020-09-30 10:28:06 +07:00
|
|
|
|
|
2021-07-17 15:19:19 +07:00
|
|
|
|
&[value]::-webkit-progress-value {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
&::-moz-progress-bar {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
2020-09-30 10:28:06 +07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-02 22:18:14 +07:00
|
|
|
|
@keyframes progressIndeterminate {
|
2020-09-30 10:28:06 +07:00
|
|
|
|
0% {
|
|
|
|
|
background-position: 200% 0;
|
|
|
|
|
}
|
|
|
|
|
100% {
|
|
|
|
|
background-position: -200% 0;
|
|
|
|
|
}
|
|
|
|
|
}
|