slider.less 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Slider
  2. // --------------------------------------------------
  3. // Default controls
  4. // -------------------------
  5. .ui-slider {
  6. .progress();
  7. margin-bottom: 20px;
  8. position: relative;
  9. cursor: pointer;
  10. }
  11. .ui-slider-handle {
  12. background-color: @slider-handle-bg;
  13. border-radius: 50%;
  14. cursor: pointer;
  15. height: 18px;
  16. position: absolute;
  17. width: 18px;
  18. z-index: 2;
  19. transition: background .25s;
  20. &:hover,
  21. &:focus {
  22. background-color: @slider-handle-hover-bg;
  23. outline: none;
  24. }
  25. &:active {
  26. background-color: @slider-handle-active-bg;
  27. }
  28. }
  29. .ui-slider-range {
  30. background-color: @slider-range-bg;
  31. display: block;
  32. height: 100%;
  33. position: absolute;
  34. z-index: 1;
  35. }
  36. // Segments
  37. // -------------------------
  38. .ui-slider-segment {
  39. background-color: @slider-segment-bg;
  40. border-radius: 50%;
  41. height: 6px;
  42. width: 6px;
  43. }
  44. // Values
  45. // -------------------------
  46. .ui-slider-value {
  47. float: right;
  48. font-size: @slider-value-font-size;
  49. margin-top: @slider-height;
  50. &.first {
  51. clear: left;
  52. float: left;
  53. }
  54. }
  55. // Horizontal orientation
  56. // -------------------------
  57. .ui-slider-horizontal {
  58. .ui-slider-handle {
  59. margin-left: -9px;
  60. top: -3px;
  61. &[style*="100"] {
  62. margin-left: -15px;
  63. }
  64. }
  65. .ui-slider-range {
  66. border-radius: 30px 0 0 30px;
  67. }
  68. .ui-slider-segment {
  69. float: left;
  70. margin: 3px -6px 0 0;
  71. }
  72. }
  73. // Vertical orientation
  74. // -------------------------
  75. .ui-slider-vertical {
  76. width: @slider-height;
  77. .ui-slider-handle {
  78. margin-left: -3px;
  79. margin-bottom: -11px;
  80. top: auto;
  81. }
  82. .ui-slider-range {
  83. width: 100%;
  84. bottom: 0;
  85. border-radius: 0 0 30px 30px;
  86. }
  87. .ui-slider-segment {
  88. position: absolute;
  89. right: 3px;
  90. }
  91. }