_slider.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // /**
  2. // * Copyright © Magento, Inc. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. //
  6. // Variables
  7. // _____________________________________________
  8. @data-slider-track__background-color: @color-gray-light3;
  9. @data-slider-track__font-size: 1.1rem;
  10. @data-slider-track__height: .1rem;
  11. @data-slider-track__width: 100%;
  12. @data-slider-track__z-index: @z-index-1;
  13. @data-slider-handle__background-color: @color-white-smoke;
  14. @data-slider-handle__border-color: @color-gray76;
  15. @data-slider-handle__box-shadow: 0 1px 2px 2px rgba(0, 0, 0, .03);
  16. @data-slider-handle__height: 2.2rem;
  17. @data-slider-handle__width: @data-slider-handle__height;
  18. @data-slider-handle-accent__background-color__end: @color-white-fog;
  19. @data-slider-handle-accent__background-color__start: @color-gray-light2;
  20. @data-slider-handle-accent__height: .8rem;
  21. @data-slider-handle-accent__width: @data-slider-handle-accent__height;
  22. //
  23. // Slider
  24. // _____________________________________________
  25. .data-slider {
  26. &:extend(.abs-clearfix all);
  27. background: none;
  28. font-size: @data-slider-track__font-size;
  29. min-height: @data-slider-handle__height;
  30. padding-top: 1.2rem;
  31. position: relative;
  32. width: @data-slider-track__width;
  33. &:before {
  34. background: @data-slider-track__background-color;
  35. content: '';
  36. display: block;
  37. height: @data-slider-track__height;
  38. position: absolute;
  39. top: 0;
  40. width: 100%;
  41. z-index: @data-slider-track__z-index;
  42. }
  43. .ui-slider-handle {
  44. .data-slider-handle;
  45. }
  46. }
  47. .data-slider-from {
  48. float: left;
  49. }
  50. .data-slider-to {
  51. float: right;
  52. }
  53. .data-slider-handle {
  54. background: @data-slider-handle__background-color;
  55. border: 1px solid @data-slider-handle__border-color;
  56. border-radius: 50%;
  57. box-shadow: @data-slider-handle__box-shadow;
  58. cursor: pointer;
  59. display: block;
  60. height: @data-slider-handle__height;
  61. margin-left: -@data-slider-handle__width / 2 !important;
  62. position: absolute;
  63. top: -@data-slider-handle__height / 2;
  64. width: @data-slider-handle__width;
  65. z-index: @data-slider-track__z-index + 1 !important;
  66. &:before {
  67. .lib-background-gradient(
  68. @_background-gradient: true,
  69. @_background-gradient-direction: vertical,
  70. @_background-gradient-color-start: @data-slider-handle-accent__background-color__start,
  71. @_background-gradient-color-end: @data-slider-handle-accent__background-color__end,
  72. @_background-gradient-color-position: false
  73. );
  74. border-radius: 50%;
  75. content: '';
  76. display: block;
  77. height: @data-slider-handle-accent__height;
  78. left: 50%;
  79. margin: -@data-slider-handle-accent__height / 2 0 0 -@data-slider-handle-accent__width / 2;
  80. position: absolute;
  81. top: 50%;
  82. width: @data-slider-handle-accent__width;
  83. }
  84. }