|
| 1 | +@import "../../globals.ios"; |
| 2 | + |
| 3 | +// iOS Range |
| 4 | +// -------------------------------------------------- |
| 5 | + |
| 6 | +$range-ios-slider-height: 42px !default; |
| 7 | + |
| 8 | +$range-ios-hit-width: 42px !default; |
| 9 | +$range-ios-hit-height: $range-ios-slider-height !default; |
| 10 | + |
| 11 | +$range-ios-bar-height: 2px !default; |
| 12 | +$range-ios-bar-background-color: #bdbdbd !default; |
| 13 | +$range-ios-bar-active-background-color: color($colors-ios, primary) !default; |
| 14 | + |
| 15 | +$range-ios-knob-width: 12px !default; |
| 16 | +$range-ios-knob-height: $range-ios-knob-width !default; |
| 17 | +$range-ios-knob-background-color: $range-ios-bar-active-background-color !default; |
| 18 | + |
| 19 | +$range-ios-tick-width: 6px !default; |
| 20 | +$range-ios-tick-height: $range-ios-tick-width !default; |
| 21 | +$range-ios-tick-background-color: $range-ios-bar-background-color !default; |
| 22 | +$range-ios-tick-active-background-color: $range-ios-bar-active-background-color !default; |
| 23 | + |
| 24 | +$range-ios-pin-background-color: $range-ios-bar-active-background-color !default; |
| 25 | +$range-ios-pin-color: color-contrast($colors-ios, $range-ios-pin-background-color) !default; |
| 26 | +$range-ios-pin-font-size: 12px !default; |
| 27 | + |
| 28 | + |
| 29 | +.item-range .item-inner { |
| 30 | + overflow: visible; |
| 31 | +} |
| 32 | + |
| 33 | +.item-range .input-wrapper { |
| 34 | + overflow: visible; |
| 35 | + |
| 36 | + flex-direction: column; |
| 37 | +} |
| 38 | + |
| 39 | +.item-range ion-range { |
| 40 | + width: 100%; |
| 41 | +} |
| 42 | + |
| 43 | +ion-range { |
| 44 | + position: relative; |
| 45 | + display: block; |
| 46 | + |
| 47 | + margin-top: -16px; |
| 48 | + padding: 8px; |
| 49 | +} |
| 50 | + |
| 51 | +.range-slider { |
| 52 | + position: relative; |
| 53 | + |
| 54 | + height: $range-ios-slider-height; |
| 55 | + |
| 56 | + cursor: pointer; |
| 57 | +} |
| 58 | + |
| 59 | +.range-bar { |
| 60 | + position: absolute; |
| 61 | + top: ($range-ios-slider-height / 2); |
| 62 | + left: 0; |
| 63 | + |
| 64 | + width: 100%; |
| 65 | + height: $range-ios-bar-height; |
| 66 | + |
| 67 | + background: $range-ios-bar-background-color; |
| 68 | + |
| 69 | + pointer-events: none; |
| 70 | +} |
| 71 | + |
| 72 | +.range-pressed .range-bar-active { |
| 73 | + will-change: left, right; |
| 74 | +} |
| 75 | + |
| 76 | +.range-pressed .range-knob-handle { |
| 77 | + will-change: left; |
| 78 | +} |
| 79 | + |
| 80 | +.range-bar-active { |
| 81 | + bottom: 0; |
| 82 | + |
| 83 | + width: auto; |
| 84 | + |
| 85 | + background: $range-ios-bar-active-background-color; |
| 86 | +} |
| 87 | + |
| 88 | +.range-knob-handle { |
| 89 | + position: absolute; |
| 90 | + top: ($range-ios-slider-height / 2); |
| 91 | + left: 0%; |
| 92 | + |
| 93 | + margin-top: -($range-ios-hit-height / 2); |
| 94 | + margin-left: -($range-ios-hit-width / 2); |
| 95 | + |
| 96 | + width: $range-ios-hit-width; |
| 97 | + height: $range-ios-hit-height; |
| 98 | + |
| 99 | + text-align: center; |
| 100 | +} |
| 101 | + |
| 102 | +.range-knob { |
| 103 | + position: absolute; |
| 104 | + top: ($range-ios-hit-height / 2) - ($range-ios-knob-height / 2) + ($range-ios-bar-height / 2); |
| 105 | + left: ($range-ios-hit-width / 2) - ($range-ios-knob-width / 2); |
| 106 | + |
| 107 | + width: $range-ios-knob-width; |
| 108 | + height: $range-ios-knob-height; |
| 109 | + |
| 110 | + border-radius: 50%; |
| 111 | + |
| 112 | + background: $range-ios-knob-background-color; |
| 113 | + |
| 114 | + pointer-events: none; |
| 115 | +} |
| 116 | + |
| 117 | +.range-tick { |
| 118 | + position: absolute; |
| 119 | + top: ($range-ios-hit-height / 2) - ($range-ios-tick-height / 2) + ($range-ios-bar-height / 2); |
| 120 | + |
| 121 | + margin-left: ($range-ios-tick-width / 2) * -1; |
| 122 | + |
| 123 | + width: $range-ios-tick-width; |
| 124 | + height: $range-ios-tick-height; |
| 125 | + |
| 126 | + border-radius: 50%; |
| 127 | + |
| 128 | + background: $range-ios-tick-background-color; |
| 129 | + |
| 130 | + pointer-events: none; |
| 131 | +} |
| 132 | + |
| 133 | +.range-tick-active { |
| 134 | + background: $range-ios-tick-active-background-color; |
| 135 | +} |
| 136 | + |
| 137 | +.range-pin { |
| 138 | + position: relative; |
| 139 | + top: -20px; |
| 140 | + display: inline-block; |
| 141 | + |
| 142 | + padding: 8px; |
| 143 | + |
| 144 | + min-width: 28px; |
| 145 | + |
| 146 | + border-radius: 50px; |
| 147 | + |
| 148 | + font-size: $range-ios-pin-font-size; |
| 149 | + |
| 150 | + text-align: center; |
| 151 | + |
| 152 | + color: $range-ios-pin-color; |
| 153 | + |
| 154 | + background: $range-ios-pin-background-color; |
| 155 | + |
| 156 | + transform: translate3d(0, 28px, 0) scale(.01); |
| 157 | + transition: transform 120ms ease; |
| 158 | +} |
| 159 | + |
| 160 | +.range-knob-pressed .range-pin { |
| 161 | + transform: translate3d(0, 0, 0) scale(1); |
| 162 | +} |
0 commit comments