123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
-
- /*~
- name: Progress Bar
- category: Progress Bar
- elements: ons-progress-bar
- markup: |
- <div class="progress-bar">
- <div class="progress-bar__primary" style="width: 30%"></div>
- </div>
- <br />
- <div class="progress-bar">
- <div class="progress-bar__primary" style="width:20%"></div>
- <div class="progress-bar__secondary" style="width:76%"></div>
- </div>
- <br />
- <div class="progress-bar progress-bar--indeterminate">
- </div>
- */
-
- .progress-bar {
- position: relative;
- height: 2px;
- display: block;
- width: 100%;
- background-color: var(--progress-bar-background-color);
- background-clip: padding-box;
- margin: 0;
- overflow: hidden;
- border-radius: 4px;
- }
-
- .progress-bar__primary,
- .progress-bar__secondary {
- position: absolute;
- background-color: var(--progress-bar-color);
- top: 0;
- bottom: 0;
- transition: width .3s linear;
- z-index: 100;
- border-radius: 4px;
- }
-
- .progress-bar__secondary {
- background-color: var(--progress-bar-secondary-color);
- z-index: 0;
- }
-
- .progress-bar--indeterminate:before {
- content: '';
- position: absolute;
- background-color: var(--progress-bar-color);
- top: 0;
- left: 0;
- bottom: 0;
- will-change: left, right;
- animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
- border-radius: 4px;
- }
-
- .progress-bar--indeterminate:after {
- content: '';
- position: absolute;
- background-color: var(--progress-bar-color);
- top: 0;
- left: 0;
- bottom: 0;
- will-change: left, right;
- animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
- animation-delay: 1.15s;
- border-radius: 4px;
- }
-
- @keyframes progress-bar__indeterminate {
- 0% {
- left: -35%;
- right: 100%;
- }
-
- 60% {
- left: 100%;
- right: -90%;
- }
-
- 100% {
- left: 100%;
- right: -90%;
- }
- }
-
- @keyframes progress-bar__indeterminate-short {
- 0% {
- left: -200%;
- right: 100%;
- }
-
- 60% {
- left: 107%;
- right: -8%;
- }
-
- 100% {
- left: 107%;
- right: -8%;
- }
- }
-
- /*~
- name: Material Progress Bar
- category: Progress Bar
- elements: ons-progress-bar
- markup: |
- <div class="progress-bar progress-bar--material">
- <div class="progress-bar__primary progress-bar--material__primary" style="width: 30%"></div>
- </div>
- <br />
- <div class="progress-bar progress-bar--material">
- <div class="progress-bar__primary progress-bar--material__primary" style="width:20%"></div>
- <div class="progress-bar__secondary progress-bar--material__secondary" style="width:76%"></div>
- </div>
- <br />
- <div class="progress-bar progress-bar--material progress-bar--indeterminate">
- </div>
- */
-
- .progress-bar--material {
- height: 4px;
- background-color: var(--material-progress-bar-background-color);
- border-radius: 0;
- }
-
- .progress-bar--material__primary,
- .progress-bar--material__secondary {
- background-color: var(--material-progress-bar-primary-color);
- border-radius: 0;
- }
-
- .progress-bar--material__secondary {
- background-color: var(--material-progress-bar-secondary-color);
- z-index: 0;
- }
-
- .progress-bar--material.progress-bar--indeterminate:before { /* FIXME */
- background-color: var(--material-progress-bar-primary-color);
- border-radius: 0;
- }
-
- .progress-bar--material.progress-bar--indeterminate:after { /* FIXME */
- background-color: var(--material-progress-bar-primary-color);
- border-radius: 0;
- }
|