| OLD | NEW |
| (Empty) |
| 1 /** | |
| 2 @license | |
| 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.g
ithub.io/LICENSE | |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS | |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS | |
| 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/PATEN
TS | |
| 9 */ | |
| 10 | |
| 11 :host { | |
| 12 display: inline-block; | |
| 13 width: 200px; | |
| 14 cursor: default; | |
| 15 -webkit-user-select: none; | |
| 16 -moz-user-select: none; | |
| 17 -ms-user-select: none; | |
| 18 user-select: none; | |
| 19 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | |
| 20 } | |
| 21 | |
| 22 :host(:not([disabled])) #sliderBar::shadow #activeProgress { | |
| 23 background-color: var(--paper-slider-active-color, --google-blue-700); | |
| 24 } | |
| 25 | |
| 26 :host(:not([disabled])) #sliderBar::shadow #secondaryProgress { | |
| 27 background-color: var(--paper-slider-secondary-color, --google-blue-300); | |
| 28 } | |
| 29 | |
| 30 :host([disabled]) #sliderBar::shadow #activeProgress { | |
| 31 background-color: var(--paper-slider-disabled-active-color, --google-grey-500)
; | |
| 32 } | |
| 33 | |
| 34 :host([disabled]) #sliderBar::shadow #secondaryProgress { | |
| 35 background-color: var(--paper-slider-disabled-secondary-color, --google-grey-3
00); | |
| 36 } | |
| 37 | |
| 38 :host(:focus) { | |
| 39 outline: none; | |
| 40 } | |
| 41 | |
| 42 #sliderContainer { | |
| 43 position: relative; | |
| 44 width: calc(100% - 32px); | |
| 45 height: 32px; | |
| 46 } | |
| 47 | |
| 48 #sliderContainer.editable { | |
| 49 float: left; | |
| 50 width: calc(100% - 72px); | |
| 51 margin: 12px 0; | |
| 52 } | |
| 53 | |
| 54 .bar-container { | |
| 55 position: absolute; | |
| 56 top: 0; | |
| 57 left: 16px; | |
| 58 height: 100%; | |
| 59 width: 100%; | |
| 60 overflow: hidden; | |
| 61 } | |
| 62 | |
| 63 .ring > .bar-container { | |
| 64 left: 20px; | |
| 65 width: calc(100% - 4px); | |
| 66 transition: left 0.18s ease, width 0.18s ease; | |
| 67 } | |
| 68 | |
| 69 .ring.expand:not(.pin) > .bar-container { | |
| 70 left: 30px; | |
| 71 width: calc(100% - 14px); | |
| 72 } | |
| 73 | |
| 74 .ring.expand.dragging > .bar-container { | |
| 75 transition: none; | |
| 76 } | |
| 77 | |
| 78 #sliderBar { | |
| 79 position: absolute; | |
| 80 top: 15px; | |
| 81 left: 0; | |
| 82 height: 2px; | |
| 83 width: 100%; | |
| 84 padding: 8px 0; | |
| 85 margin: -8px 0; | |
| 86 } | |
| 87 | |
| 88 .ring #sliderBar { | |
| 89 left: -4px; | |
| 90 width: calc(100% + 4px); | |
| 91 } | |
| 92 | |
| 93 .ring.expand:not(.pin) #sliderBar { | |
| 94 left: -14px; | |
| 95 width: calc(100% + 14px); | |
| 96 } | |
| 97 | |
| 98 .slider-markers { | |
| 99 position: absolute; | |
| 100 top: 15px; | |
| 101 left: 15px; | |
| 102 height: 2px; | |
| 103 width: calc(100% + 2px); | |
| 104 box-sizing: border-box; | |
| 105 pointer-events: none; | |
| 106 } | |
| 107 | |
| 108 .slider-markers::after, | |
| 109 .slider-marker::after { | |
| 110 content: ""; | |
| 111 display: block; | |
| 112 width: 2px; | |
| 113 height: 2px; | |
| 114 border-radius: 50%; | |
| 115 background-color: black; | |
| 116 } | |
| 117 | |
| 118 .transiting #sliderBar::shadow #activeProgress { | |
| 119 transition: -webkit-transform 0.08s ease; | |
| 120 transition: transform 0.08s ease; | |
| 121 } | |
| 122 | |
| 123 #sliderKnob { | |
| 124 @apply(--layout-center-justified); | |
| 125 @apply(--layout-center); | |
| 126 @apply(--layout-horizontal); | |
| 127 | |
| 128 position: absolute; | |
| 129 left: 0; | |
| 130 top: 0; | |
| 131 width: 32px; | |
| 132 height: 32px; | |
| 133 } | |
| 134 | |
| 135 .transiting > #sliderKnob { | |
| 136 transition: left 0.08s ease; | |
| 137 } | |
| 138 | |
| 139 #sliderKnob:focus { | |
| 140 outline: none; | |
| 141 } | |
| 142 | |
| 143 #sliderKnob.dragging { | |
| 144 transition: none; | |
| 145 } | |
| 146 | |
| 147 .snaps > #sliderKnob.dragging { | |
| 148 transition: -webkit-transform 0.08s ease; | |
| 149 transition: transform 0.08s ease; | |
| 150 } | |
| 151 | |
| 152 #sliderKnobInner { | |
| 153 width: 12px; | |
| 154 height: 12px; | |
| 155 box-sizing: border-box; | |
| 156 -moz-box-sizing: border-box; | |
| 157 border-radius: 50%; | |
| 158 background-color: var(--paper-slider-knob-color, --google-blue-700); | |
| 159 transition-property: height, width, background-color, border; | |
| 160 transition-duration: 0.1s; | |
| 161 transition-timing-function: ease; | |
| 162 } | |
| 163 | |
| 164 .expand:not(.pin) > #sliderKnob > #sliderKnobInner { | |
| 165 width: 100%; | |
| 166 height: 100%; | |
| 167 -webkit-transform: translateZ(0); | |
| 168 transform: translateZ(0); | |
| 169 } | |
| 170 | |
| 171 .ring > #sliderKnob > #sliderKnobInner { | |
| 172 background-color: transparent; | |
| 173 border: 2px solid #c8c8c8; | |
| 174 } | |
| 175 | |
| 176 #sliderKnobInner::before { | |
| 177 background-color: var(--paper-slider-pin-color, --google-blue-700); | |
| 178 } | |
| 179 | |
| 180 .pin > #sliderKnob > #sliderKnobInner::before { | |
| 181 content: ""; | |
| 182 position: absolute; | |
| 183 top: 0; | |
| 184 left: 0; | |
| 185 width: 26px; | |
| 186 height: 26px; | |
| 187 margin-left: 3px; | |
| 188 border-radius: 50% 50% 50% 0; | |
| 189 -webkit-transform: rotate(-45deg) scale(0) translate(0); | |
| 190 transform: rotate(-45deg) scale(0) translate(0); | |
| 191 } | |
| 192 | |
| 193 #sliderKnobInner::before, | |
| 194 #sliderKnobInner::after { | |
| 195 transition: -webkit-transform .2s ease, background-color .18s ease; | |
| 196 transition: transform .2s ease, background-color .18s ease; | |
| 197 } | |
| 198 | |
| 199 .pin.ring > #sliderKnob > #sliderKnobInner::before { | |
| 200 background-color: #c8c8c8; | |
| 201 } | |
| 202 | |
| 203 .pin.expand > #sliderKnob > #sliderKnobInner::before { | |
| 204 -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); | |
| 205 transform: rotate(-45deg) scale(1) translate(17px, -17px); | |
| 206 } | |
| 207 | |
| 208 .pin > #sliderKnob > #sliderKnobInner::after { | |
| 209 content: attr(value); | |
| 210 position: absolute; | |
| 211 top: 0; | |
| 212 left: 0; | |
| 213 width: 32px; | |
| 214 height: 26px; | |
| 215 text-align: center; | |
| 216 color: var(--paper-slider-font-color, #fff); | |
| 217 font-size: 10px; | |
| 218 -webkit-transform: scale(0) translate(0); | |
| 219 transform: scale(0) translate(0); | |
| 220 } | |
| 221 | |
| 222 .pin.expand > #sliderKnob > #sliderKnobInner::after { | |
| 223 -webkit-transform: scale(1) translate(0, -17px); | |
| 224 transform: scale(1) translate(0, -17px); | |
| 225 } | |
| 226 | |
| 227 /* editable: paper-input */ | |
| 228 .slider-input { | |
| 229 width: 40px; | |
| 230 float: right; | |
| 231 overflow: hidden; | |
| 232 } | |
| 233 | |
| 234 .slider-input::shadow input { | |
| 235 /* FIXME(ffu): should one be able set text-align directly on paper-input? */ | |
| 236 text-align: center; | |
| 237 } | |
| 238 | |
| 239 /* disabled state */ | |
| 240 #sliderContainer.disabled { | |
| 241 pointer-events: none; | |
| 242 } | |
| 243 | |
| 244 .disabled > #sliderKnob > #sliderKnobInner { | |
| 245 width: 8px; | |
| 246 height: 8px; | |
| 247 background-color: var(--paper-slider-disabled-knob-color, --google-grey-500); | |
| 248 } | |
| 249 | |
| 250 .disabled.ring > #sliderKnob > #sliderKnobInner { | |
| 251 background-color: transparent; | |
| 252 } | |
| OLD | NEW |