You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
3.6 KiB

  1. /**
  2. * Range
  3. * --------------------------------------------------
  4. */
  5. .range input{
  6. display: inline-block;
  7. overflow: hidden;
  8. margin-top: 5px;
  9. margin-bottom: 5px;
  10. padding-right: 2px;
  11. padding-left: 1px;
  12. width: auto;
  13. height: $range-slider-height + 15;
  14. outline: none;
  15. background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg));
  16. background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%);
  17. background-position: center;
  18. background-size: 99% $range-track-height;
  19. background-repeat: no-repeat;
  20. -webkit-appearance: none;
  21. &::-moz-focus-outer {
  22. /* hide the focus outline in Firefox */
  23. border: 0;
  24. }
  25. &::-webkit-slider-thumb {
  26. position: relative;
  27. width: $range-slider-width;
  28. height: $range-slider-height;
  29. border-radius: $range-slider-border-radius;
  30. background-color: $toggle-handle-off-bg-color;
  31. box-shadow: $range-slider-box-shadow;
  32. cursor: pointer;
  33. -webkit-appearance: none;
  34. border: 0;
  35. }
  36. &::-webkit-slider-thumb:before{
  37. /* what creates the colorful line on the left side of the slider */
  38. position: absolute;
  39. top: ($range-slider-height / 2) - ($range-track-height / 2);
  40. left: -2001px;
  41. width: 2000px;
  42. height: $range-track-height;
  43. background: $dark;
  44. content: ' ';
  45. }
  46. &::-webkit-slider-thumb:after {
  47. /* create a larger (but hidden) hit area */
  48. position: absolute;
  49. top: -15px;
  50. left: -15px;
  51. padding: 30px;
  52. content: ' ';
  53. //background: red;
  54. //opacity: .5;
  55. }
  56. &::-ms-fill-lower{
  57. height: $range-track-height;
  58. background:$dark;
  59. }
  60. /*
  61. &::-ms-track{
  62. background: transparent;
  63. border-color: transparent;
  64. border-width: 11px 0 16px;
  65. color:transparent;
  66. margin-top:20px;
  67. }
  68. &::-ms-thumb {
  69. width: $range-slider-width;
  70. height: $range-slider-height;
  71. border-radius: $range-slider-border-radius;
  72. background-color: $toggle-handle-off-bg-color;
  73. border-color:$toggle-handle-off-bg-color;
  74. box-shadow: $range-slider-box-shadow;
  75. margin-left:1px;
  76. margin-right:1px;
  77. outline:none;
  78. }
  79. &::-ms-fill-upper {
  80. height: $range-track-height;
  81. background:$range-default-track-bg;
  82. }
  83. */
  84. }
  85. .range {
  86. @include display-flex();
  87. @include align-items(center);
  88. padding: 2px 11px;
  89. &.range-light {
  90. input { @include range-style($range-light-track-bg); }
  91. }
  92. &.range-stable {
  93. input { @include range-style($range-stable-track-bg); }
  94. }
  95. &.range-positive {
  96. input { @include range-style($range-positive-track-bg); }
  97. }
  98. &.range-calm {
  99. input { @include range-style($range-calm-track-bg); }
  100. }
  101. &.range-balanced {
  102. input { @include range-style($range-balanced-track-bg); }
  103. }
  104. &.range-assertive {
  105. input { @include range-style($range-assertive-track-bg); }
  106. }
  107. &.range-energized {
  108. input { @include range-style($range-energized-track-bg); }
  109. }
  110. &.range-royal {
  111. input { @include range-style($range-royal-track-bg); }
  112. }
  113. &.range-dark {
  114. input { @include range-style($range-dark-track-bg); }
  115. }
  116. }
  117. .range .icon {
  118. @include flex(0);
  119. display: block;
  120. min-width: $range-icon-size;
  121. text-align: center;
  122. font-size: $range-icon-size;
  123. }
  124. .range input {
  125. @include flex(1);
  126. display: block;
  127. margin-right: 10px;
  128. margin-left: 10px;
  129. }
  130. .range-label {
  131. @include flex(0, 0, auto);
  132. display: block;
  133. white-space: nowrap;
  134. }
  135. .range-label:first-child {
  136. padding-left: 5px;
  137. }
  138. .range input + .range-label {
  139. padding-right: 5px;
  140. padding-left: 0;
  141. }
  142. // WP range height must be auto
  143. .platform-windowsphone{
  144. .range input{
  145. height:auto;
  146. }
  147. }