163 lines
4.2 KiB
CSS
163 lines
4.2 KiB
CSS
/*
|
|
Copyright 2019 Adobe. All rights reserved.
|
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
governing permissions and limitations under the License.
|
|
*/
|
|
|
|
@import "../vars/css/components/spectrum-progressbar.css";
|
|
@import "../vars/css/components/spectrum-meter.css";
|
|
@import "../vars/css/components/spectrum-fieldlabel.css";
|
|
|
|
.spectrum-ProgressBar--sizeS {
|
|
@remapvars {
|
|
find: --spectrum-progressbar-s-;
|
|
replace: --spectrum-progressbar-;
|
|
}
|
|
@remapvars {
|
|
find: --spectrum-fieldlabel-side-s-;
|
|
replace: --spectrum-fieldlabel-side-;
|
|
}
|
|
}
|
|
|
|
.spectrum-ProgressBar--sizeM {
|
|
@remapvars {
|
|
find: --spectrum-progressbar-m-;
|
|
replace: --spectrum-progressbar-;
|
|
}
|
|
@remapvars {
|
|
find: --spectrum-fieldlabel-side-m-;
|
|
replace: --spectrum-fieldlabel-side-;
|
|
}
|
|
}
|
|
|
|
.spectrum-ProgressBar--sizeL {
|
|
@remapvars {
|
|
find: --spectrum-progressbar-l-;
|
|
replace: --spectrum-progressbar-;
|
|
}
|
|
@remapvars {
|
|
find: --spectrum-fieldlabel-side-l-;
|
|
replace: --spectrum-fieldlabel-side-;
|
|
}
|
|
}
|
|
|
|
.spectrum-ProgressBar--sizeXL {
|
|
@remapvars {
|
|
find: --spectrum-progressbar-xl-;
|
|
replace: --spectrum-progressbar-;
|
|
}
|
|
@remapvars {
|
|
find: --spectrum-fieldlabel-side-xl-;
|
|
replace: --spectrum-fieldlabel-side-;
|
|
}
|
|
}
|
|
|
|
.spectrum-ProgressBar {
|
|
position: relative;
|
|
display: inline-flex;
|
|
flex-flow: row wrap;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
inline-size: var(--spectrum-progressbar-width);
|
|
vertical-align: top;
|
|
}
|
|
|
|
.spectrum-ProgressBar-track {
|
|
/* Visually apply border radius to child elements */
|
|
overflow: hidden;
|
|
inline-size: 100%;
|
|
block-size: var(--spectrum-progressbar-height);
|
|
border-radius: var(--spectrum-progressbar-border-radius);
|
|
z-index: 1; /* to fix a weird webkit bug with rounded corners and masking */
|
|
}
|
|
|
|
.spectrum-ProgressBar-fill {
|
|
border: none;
|
|
block-size: var(--spectrum-progressbar-height);
|
|
|
|
transition: width 1s;
|
|
}
|
|
|
|
.spectrum-ProgressBar-label,
|
|
.spectrum-ProgressBar-percentage {
|
|
text-align: start;
|
|
margin-block-end: var(--spectrum-progressbar-label-gap-y);
|
|
}
|
|
|
|
.spectrum-ProgressBar-label {
|
|
flex: 1 1 0%;
|
|
}
|
|
|
|
.spectrum-ProgressBar-percentage {
|
|
align-self: flex-start;
|
|
margin-inline-start: var(--spectrum-fieldlabel-side-padding-right);
|
|
}
|
|
|
|
.spectrum-ProgressBar--sideLabel {
|
|
display: inline-flex;
|
|
flex-flow: row;
|
|
justify-content: space-between;
|
|
inline-size: auto;
|
|
|
|
.spectrum-ProgressBar-track {
|
|
min-width: var(--spectrum-progressbar-width);
|
|
flex: 1 1 var(--spectrum-progressbar-width);
|
|
}
|
|
|
|
.spectrum-ProgressBar-label {
|
|
flex-grow: 0;
|
|
margin-inline-end: var(--spectrum-fieldlabel-side-padding-right);
|
|
margin-block-end: 0;
|
|
}
|
|
.spectrum-ProgressBar-percentage {
|
|
order: 3;
|
|
text-align: end;
|
|
margin-inline-start: var(--spectrum-fieldlabel-side-padding-right);
|
|
margin-block-end: 0;
|
|
}
|
|
}
|
|
|
|
.spectrum-ProgressBar--indeterminate .spectrum-ProgressBar-fill {
|
|
inline-size: var(--spectrum-progressbar-indeterminate-fill-width);
|
|
position: relative;
|
|
animation-timing-function: var(
|
|
--spectrum-progressbar-indeterminate-animation-ease
|
|
);
|
|
will-change: transform;
|
|
}
|
|
|
|
[dir="ltr"] .spectrum-ProgressBar--indeterminate .spectrum-ProgressBar-fill {
|
|
animation: indeterminate-loop-ltr
|
|
var(--spectrum-progressbar-indeterminate-duration) infinite;
|
|
}
|
|
[dir="rtl"] .spectrum-ProgressBar--indeterminate .spectrum-ProgressBar-fill {
|
|
animation: indeterminate-loop-rtl
|
|
var(--spectrum-progressbar-indeterminate-duration) infinite;
|
|
}
|
|
|
|
@keyframes indeterminate-loop-ltr {
|
|
from {
|
|
transform: translate(
|
|
calc(-1 * var(--spectrum-progressbar-indeterminate-fill-width))
|
|
);
|
|
}
|
|
to {
|
|
transform: translate(var(--spectrum-progressbar-width));
|
|
}
|
|
}
|
|
|
|
@keyframes indeterminate-loop-rtl {
|
|
from {
|
|
transform: translate(var(--spectrum-progressbar-width));
|
|
}
|
|
to {
|
|
transform: translate(calc(-1 * var(--spectrum-progressbar-width)));
|
|
}
|
|
}
|