|
| 1 | +/* |
| 2 | +Copyright (c) 2010-2012 Ivan Vanderbyl |
| 3 | +Originally found at http://ivan.ly/ui |
| 4 | +
|
| 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | +of this software and associated documentation files (the "Software"), to deal |
| 7 | +in the Software without restriction, including without limitation the rights |
| 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | +copies of the Software, and to permit persons to whom the Software is |
| 10 | +furnished to do so, subject to the following conditions: |
| 11 | +
|
| 12 | +The above copyright notice and this permission notice shall be included in |
| 13 | +all copies or substantial portions of the Software. |
| 14 | +
|
| 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 21 | +THE SOFTWARE. |
| 22 | +
|
| 23 | +*/ |
| 24 | +/* Webkit animation keyframes */ |
| 25 | +@-webkit-keyframes animate-stripes { |
| 26 | + to { |
| 27 | + background-position: 0 0; |
| 28 | + } |
| 29 | + |
| 30 | + from { |
| 31 | + background-position: 44px 0; |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +@-moz-keyframes animate-stripes { |
| 36 | + to { |
| 37 | + background-position: 0 0; |
| 38 | + } |
| 39 | + |
| 40 | + from { |
| 41 | + background-position: 36px 0; |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +/* Bar which is placed behind the progress */ |
| 46 | +.ui-progress-bar { |
| 47 | + /* Usual setup stuff */ |
| 48 | + position: relative; |
| 49 | + height: 25px; |
| 50 | + /* Pad right so we don't cover the borders when fully progressed */ |
| 51 | + padding-right: 2px; |
| 52 | + /* For browser that don't support gradients, we'll set a blanket background colour */ |
| 53 | + background-color: #abb2bc; |
| 54 | + /* Rounds the ends, we specify an excessive amount to make sure they are completely rounded */ |
| 55 | + /* Adjust to your liking, and don't forget to adjust to the same amount in .ui-progress */ |
| 56 | + -moz-border-radius: 25px; |
| 57 | + -webkit-border-radius: 25px; |
| 58 | + -o-border-radius: 25px; |
| 59 | + -ms-border-radius: 25px; |
| 60 | + -khtml-border-radius: 25px; |
| 61 | + border-radius: 25px; |
| 62 | + /* Background gradient */ |
| 63 | + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #949daa), color-stop(100%, #abb2bc)); |
| 64 | + background: -webkit-linear-gradient(#949daa 0%, #abb2bc 100%); |
| 65 | + background: -moz-linear-gradient(#949daa 0%, #abb2bc 100%); |
| 66 | + background: -o-linear-gradient(#949daa 0%, #abb2bc 100%); |
| 67 | + background: -ms-linear-gradient(#949daa 0%, #abb2bc 100%); |
| 68 | + background: linear-gradient(#949daa 0%, #abb2bc 100%); |
| 69 | + /* Give it the inset look by adding some shadows and highlights */ |
| 70 | + -moz-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px white; |
| 71 | + -webkit-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px white; |
| 72 | + -o-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px white; |
| 73 | + box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px white; |
| 74 | + /* Alt colours */ |
| 75 | + /* Progress part of the progress bar */ |
| 76 | +} |
| 77 | +.ui-progress-bar.blue .ui-progress { |
| 78 | + background-color: #339BB9!important; |
| 79 | + border: 1px solid #287a91; |
| 80 | +} |
| 81 | +.ui-progress-bar.error .ui-progress { |
| 82 | + background-color: #C43C35 !important; |
| 83 | + border: 1px solid #9c302a; |
| 84 | +} |
| 85 | +.ui-progress-bar.warning .ui-progress { |
| 86 | + background-color: #D9B31A!important; |
| 87 | + border: 1px solid #ab8d15; |
| 88 | +} |
| 89 | +.ui-progress-bar.success .ui-progress { |
| 90 | + background-color: #57A957!important; |
| 91 | + border: 1px solid #458845; |
| 92 | +} |
| 93 | +.ui-progress-bar.transition .ui-progress { |
| 94 | + -moz-transition: background-color 0.5s ease-in, border-color 1.5s ease-out, box-shadow 1.5s ease-out; |
| 95 | + -webkit-transition: background-color 0.5s ease-in, border-color 1.5s ease-out, box-shadow 1.5s ease-out; |
| 96 | + -o-transition: background-color 0.5s ease-in, border-color 1.5s ease-out, box-shadow 1.5s ease-out; |
| 97 | + transition: background-color 0.5s ease-in, border-color 1.5s ease-out, box-shadow 1.5s ease-out; |
| 98 | +} |
| 99 | +.ui-progress-bar .ui-progress { |
| 100 | + /* Usual setup stuff */ |
| 101 | + position: relative; |
| 102 | + display: block; |
| 103 | + overflow: hidden; |
| 104 | + /* Height should be 2px less than .ui-progress-bar so as to not cover borders and give it a look of being inset */ |
| 105 | + height: 23px; |
| 106 | + /* Rounds the ends, we specify an excessive amount to make sure they are completely rounded */ |
| 107 | + /* Adjust to your liking, and don't forget to adjust to the same amount in .ui-progress-bar */ |
| 108 | + -moz-border-radius: 25px; |
| 109 | + -webkit-border-radius: 25px; |
| 110 | + -o-border-radius: 25px; |
| 111 | + -ms-border-radius: 25px; |
| 112 | + -khtml-border-radius: 25px; |
| 113 | + border-radius: 25px; |
| 114 | + /* Set the background size so the stripes work correctly */ |
| 115 | + -webkit-background-size: 44px 44px; |
| 116 | + -moz-background-size: 36px 36px; |
| 117 | + /* Webkit */ |
| 118 | + /* For browser that don't support gradients, we'll set a base background colour */ |
| 119 | + background-color: #74d04c; |
| 120 | + /* Webkit background stripes and gradient */ |
| 121 | + background: -webkit-gradient(linear, 0 0, 44 44, color-stop(0, rgba(255, 255, 255, 0.17)), color-stop(0.25, rgba(255, 255, 255, 0.17)), color-stop(0.26, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0)), color-stop(0.51, rgba(255, 255, 255, 0.17)), color-stop(0.75, rgba(255, 255, 255, 0.17)), color-stop(0.76, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))), -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0.35))), #74d04c; |
| 122 | + /* Mozilla (Firefox etc) background stripes */ |
| 123 | + /* Note: Mozilla's support for gradients is more true to the original design, allowing gradients at 30 degrees, as apposed to 45 degress in webkit. */ |
| 124 | + background: -moz-repeating-linear-gradient(top left -30deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.17) 15px, rgba(255, 255, 255, 0) 15px, rgba(255, 255, 255, 0) 30px), -moz-linear-gradient(rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%), #74d04c; |
| 125 | + -moz-box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4), inset 0px -1px 1px rgba(0, 0, 0, 0.2); |
| 126 | + -webkit-box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4), inset 0px -1px 1px rgba(0, 0, 0, 0.2); |
| 127 | + -o-box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4), inset 0px -1px 1px rgba(0, 0, 0, 0.2); |
| 128 | + box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4), inset 0px -1px 1px rgba(0, 0, 0, 0.2); |
| 129 | + /* Give it a higher contrast outline */ |
| 130 | + border: 1px solid #4c8932; |
| 131 | + /* Animate */ |
| 132 | + -moz-animation: animate-stripes 2s linear infinite; |
| 133 | + -webkit-animation: animate-stripes 2s linear infinite; |
| 134 | + -o-animation: animate-stripes 2s linear infinite; |
| 135 | + -ms-animation: animate-stripes 2s linear infinite; |
| 136 | + -khtml-animation: animate-stripes 2s linear infinite; |
| 137 | + animation: animate-stripes 2s linear infinite; |
| 138 | + /* Style status label */ |
| 139 | +} |
| 140 | +.ui-progress-bar .ui-progress span.ui-label { |
| 141 | + -moz-font-smoothing: antialiased; |
| 142 | + -webkit-font-smoothing: antialiased; |
| 143 | + -o-font-smoothing: antialiased; |
| 144 | + -ms-font-smoothing: antialiased; |
| 145 | + -khtml-font-smoothing: antialiased; |
| 146 | + font-smoothing: antialiased; |
| 147 | + font-size: 13px; |
| 148 | + position: absolute; |
| 149 | + right: 0; |
| 150 | + line-height: 23px; |
| 151 | + padding-right: 12px; |
| 152 | + color: rgba(0, 0, 0, 0.6); |
| 153 | + text-shadow: rgba(255, 255, 255, 0.45) 0 1px 0px; |
| 154 | + white-space: nowrap; |
| 155 | +} |
| 156 | +.ui-progress-bar .ui-progress span.ui-label b { |
| 157 | + font-weight: bold; |
| 158 | +} |
0 commit comments