@import "../../themes/ionic.globals.ios"; // iOS Range // -------------------------------------------------- /// @prop - Padding top/bottom of the range $range-ios-padding-vertical: 8px !default; /// @prop - Padding left/right of the range $range-ios-padding-horizontal: 16px !default; /// @prop - Height of the range slider $range-ios-slider-height: 42px !default; /// @prop - Width of the area that will select the range knob $range-ios-hit-width: 42px !default; /// @prop - Height of the area that will select the range knob $range-ios-hit-height: $range-ios-slider-height !default; /// @prop - Height of the range bar $range-ios-bar-height: 1px !default; /// @prop - Background of the range bar $range-ios-bar-background-color: #bdbdbd !default; /// @prop - Background of the active range bar $range-ios-bar-active-background-color: color($colors-ios, primary) !default; /// @prop - Width of the range knob $range-ios-knob-width: 28px !default; /// @prop - Height of the range knob $range-ios-knob-height: $range-ios-knob-width !default; /// @prop - Box shadow of the range knob $range-ios-knob-box-shadow: 0 3px 1px rgba(0, 0, 0, .1), 0 4px 8px rgba(0, 0, 0, .13), 0 0 0 1px rgba(0, 0, 0, .02) !default; /// @prop - Border radius of the range knob $range-ios-knob-border-radius: 50% !default; /// @prop - Background of the range knob $range-ios-knob-background-color: #fff !default; /// @prop - Width of the range tick $range-ios-tick-width: $range-ios-bar-height !default; /// @prop - Height of the range tick $range-ios-tick-height: 8px !default; /// @prop - Border radius of the range tick $range-ios-tick-border-radius: 0 !default; /// @prop - Background of the range tick $range-ios-tick-background-color: $range-ios-bar-background-color !default; /// @prop - Background of the active range tick $range-ios-tick-active-background-color: $range-ios-bar-active-background-color !default; /// @prop - Background of the range pin $range-ios-pin-background-color: transparent !default; /// @prop - Color of the range pin $range-ios-pin-color: $text-ios-color !default; /// @prop - Font size of the range pin $range-ios-pin-font-size: 12px !default; /// @prop - Padding of the range pin $range-ios-pin-padding: 8px !default; .range-ios { padding: $range-ios-padding-vertical $range-ios-padding-horizontal; } .range-ios [range-left] { margin: 0 20px 0 0; } .range-ios [range-right] { margin: 0 0 0 20px; } .range-ios.range-has-pin { padding-top: $range-ios-padding-vertical + $range-ios-pin-font-size; } .range-ios .range-slider { height: $range-ios-slider-height; } .range-ios .range-bar { position: absolute; top: ($range-ios-slider-height / 2); left: 0; width: 100%; height: $range-ios-bar-height; border-radius: 1px; background: $range-ios-bar-background-color; pointer-events: none; } .range-ios.range-pressed .range-bar-active { will-change: left, right; } .range-ios.range-pressed .range-knob-handle { will-change: left; } .range-ios .range-bar-active { bottom: 0; width: auto; background: $range-ios-bar-active-background-color; } .range-ios .range-knob-handle { position: absolute; top: ($range-ios-slider-height / 2); left: 0%; margin-top: -($range-ios-hit-height / 2); margin-left: -($range-ios-hit-width / 2); width: $range-ios-hit-width; height: $range-ios-hit-height; text-align: center; } .range-ios .range-knob { position: absolute; top: ($range-ios-hit-height / 2) - ($range-ios-knob-height / 2) + ($range-ios-bar-height / 2) - .5px; left: ($range-ios-hit-width / 2) - ($range-ios-knob-width / 2); width: $range-ios-knob-width; height: $range-ios-knob-height; border-radius: $range-ios-knob-border-radius; background: $range-ios-knob-background-color; box-shadow: $range-ios-knob-box-shadow; pointer-events: none; } .range-ios .range-tick { position: absolute; top: ($range-ios-hit-height / 2) - ($range-ios-tick-height / 2) + ($range-ios-bar-height / 2); margin-left: ($range-ios-tick-width / 2) * -1; width: $range-ios-tick-width; height: $range-ios-tick-height; border-radius: $range-ios-tick-border-radius; background: $range-ios-tick-background-color; pointer-events: none; } .range-ios .range-tick-active { background: $range-ios-tick-active-background-color; } .range-ios .range-pin { position: relative; top: -20px; display: inline-block; padding: $range-ios-pin-padding; min-width: 28px; border-radius: 50px; font-size: $range-ios-pin-font-size; text-align: center; color: $range-ios-pin-color; background: $range-ios-pin-background-color; transform: translate3d(0, 28px, 0) scale(.01); transition: transform 120ms ease; } .range-ios .range-knob-pressed .range-pin { transform: translate3d(0, 0, 0) scale(1); } .range-ios.range-disabled { opacity: .5; } // Generate iOS Range Colors // -------------------------------------------------- @each $color-name, $color-base, $color-contrast in get-colors($colors-ios) { .range-ios-#{$color-name} { .range-bar-active, .range-tick-active { background: $color-base; } } }