3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 --><html><head><link rel=
"import" href=
"../polymer/polymer.html">
10 <link rel=
"import" href=
"../paper-styles/paper-styles.html">
11 <link rel=
"import" href=
"../iron-range-behavior/iron-range-behavior.html">
12 <link rel=
"import" href=
"../iron-flex-layout/classes/iron-flex-layout.html">
15 The progress bars are for situations where the percentage completed can be
16 determined. They give users a quick sense of how much longer an operation
21 <paper-progress value="10"></paper-progress>
23 There is also a secondary progress which is useful for displaying intermediate
24 progress, such as the buffer level during a streaming playback progress bar.
28 <paper-progress value="10" secondary-progress="30"></paper-progress>
30 ### Styling progress bar:
32 To change the active progress bar color:
35 --paper-progress-active-color: #e91e63;
38 To change the secondary progress bar color:
41 --paper-progress-secondary-color: #f8bbd0;
44 To change the progress bar background color:
47 --paper-progress-container-color: #64ffda;
50 Add the class `transiting` to a paper-progress to animate the progress bar when
51 the value changed. You can also customize the transition:
54 --paper-progress-transition-duration: 0.08s;
55 --paper-progress-transition-timing-function: ease;
56 --paper-progress-transition-transition-delay: 0s;
59 The following mixins are available for styling:
63 Custom property | Description | Default
64 ----------------|-------------|----------
65 `--paper-progress-container` | Mixin applied to container | `{}`
71 @element paper-progress
76 </head><body><dom-module id=
"paper-progress">
79 display: inline-block;
84 :host(.transiting) #activeProgress,
85 :host(.transiting) #secondaryProgress {
86 -webkit-transition-property: -webkit-transform;
87 transition-property: transform;
90 -webkit-transition-duration: var(--paper-progress-transition-duration,
0.08s);
91 transition-duration: var(--paper-progress-transition-duration,
0.08s);
94 -webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
95 transition-timing-function: var(--paper-progress-transition-timing-function, ease);
98 -webkit-transition-delay: var(--paper-progress-transition-delay,
0s);
99 transition-delay: var(--paper-progress-transition-delay,
0s);
106 @apply(--paper-progress-container);
109 #progressContainer, #indeterminateSplitter {
110 background-color: var(--paper-progress-container-color, --google-grey-
300);
115 -webkit-transform-origin: left center;
116 transform-origin: left center;
117 -webkit-transform: scaleX(
0);
118 transform: scaleX(
0);
122 background-color: var(--paper-progress-active-color, --google-green-
500);
126 background-color: var(--paper-progress-secondary-color, --google-green-
100);
129 #indeterminateSplitter {
133 #activeProgress.indeterminate {
134 -webkit-transform-origin: right center;
135 transform-origin: right center;
136 -webkit-animation: indeterminate-bar
2s linear infinite;
137 animation: indeterminate-bar
2s linear infinite;
140 #indeterminateSplitter.indeterminate {
142 -webkit-transform-origin: center center;
143 transform-origin: center center;
144 -webkit-animation: indeterminate-splitter
2s linear infinite;
145 animation: indeterminate-splitter
2s linear infinite;
148 @-webkit-keyframes indeterminate-bar {
150 -webkit-transform: scaleX(
1) translateX(-
100%);
153 -webkit-transform: scaleX(
1) translateX(
0%);
156 -webkit-transform: scaleX(
1) translateX(
0%);
157 -webkit-animation-timing-function: cubic-bezier(
.28,
.62,
.37,
.91);
160 -webkit-transform: scaleX(
0) translateX(
0%);
164 @-webkit-keyframes indeterminate-splitter {
166 -webkit-transform: scaleX(
.75) translateX(-
125%);
169 -webkit-transform: scaleX(
.75) translateX(-
125%);
170 -webkit-animation-timing-function: cubic-bezier(
.42,
0,
.6,
.8);
173 -webkit-transform: scaleX(
.75) translateX(
125%);
176 -webkit-transform: scaleX(
.75) translateX(
125%);
180 @keyframes indeterminate-bar {
182 transform: scaleX(
1) translateX(-
100%);
185 transform: scaleX(
1) translateX(
0%);
188 transform: scaleX(
1) translateX(
0%);
189 animation-timing-function: cubic-bezier(
.28,
.62,
.37,
.91);
192 transform: scaleX(
0) translateX(
0%);
196 @keyframes indeterminate-splitter {
198 transform: scaleX(
.75) translateX(-
125%);
201 transform: scaleX(
.75) translateX(-
125%);
202 animation-timing-function: cubic-bezier(
.42,
0,
.6,
.8);
205 transform: scaleX(
.75) translateX(
125%);
208 transform: scaleX(
.75) translateX(
125%);
213 <div id=
"progressContainer" role=
"progressbar" aria-valuenow$=
"{{value}}" aria-valuemin$=
"{{min}}" aria-valuemax$=
"{{max}}">
214 <div id=
"secondaryProgress" class=
"fit"></div>
215 <div id=
"activeProgress" class=
"fit"></div>
216 <div id=
"indeterminateSplitter" class=
"fit"></div>
221 <script src=
"paper-progress-extracted.js"></script></body></html>