index-u.scss 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @import '@/uni_modules/lime-style/index.scss';
  2. $slider: l-slider;
  3. // $primary-color-disabled: create-var(primary-color-disabled, $primary-color-3);
  4. $slider-rail-size: create-var(slider-rail-size, 20px);
  5. $slider-rail-color: create-var(slider-rail-color, $fill-2);
  6. $slider-rail-radius: create-var(slider-rail-color, 99px);
  7. $slider-track-color: create-var(slider-track-color, $primary-color);
  8. // $slider-disabled-color: create-var(slider-disabled-color, $primary-color-disabled);
  9. $slider-thumb-size: create-var(slider-thumb-size, 12px);
  10. $slider-thumb-color: create-var(slider-thumb-color, white);
  11. $slider-thumb-radius: create-var(slider-thumb-radius, 99px);
  12. $slider-thumb-border-color: create-var(slider-thumb-border-color, $gray-1);
  13. .#{$slider} {
  14. /* #ifndef UNI-APP-X */
  15. display: flex;
  16. flex-direction: column;
  17. /* #endif */
  18. position: relative;
  19. overflow: visible;
  20. justify-content: center;
  21. // min-height: 100px;
  22. // background-color: aquamarine;
  23. &--disabled {
  24. opacity: 0.6;
  25. }
  26. &--vertical {
  27. height: 100%;
  28. /* #ifndef UNI-APP-X */
  29. display: inline-flex;
  30. /* #endif */
  31. }
  32. &__rail {
  33. position: relative;
  34. background-color: $slider-rail-color;
  35. border-radius: $slider-rail-radius;
  36. &--horizontal {
  37. height: $slider-rail-size;
  38. }
  39. &--vertical {
  40. width: $slider-rail-size;
  41. height: 100%;
  42. }
  43. }
  44. &__track {
  45. position: absolute;
  46. left: 0%;
  47. transition-duration: 100ms;
  48. transition-property: opacity;
  49. background-color: $slider-track-color;
  50. overflow: visible;
  51. border-radius: $slider-rail-radius;
  52. &--horizontal {
  53. width: 0%;
  54. height: 100%;
  55. }
  56. &--vertical {
  57. width: 100%;
  58. height: 0%;
  59. }
  60. }
  61. // &__thumbs {
  62. // position: absolute;
  63. // height: 100%;
  64. // overflow: visible;
  65. // left: calc($slider-rail-size / 2);
  66. // right: calc($slider-rail-size / 2);
  67. // pointer-events: none;
  68. // }
  69. &__thumb-wrapper {
  70. position: absolute;
  71. overflow: visible;
  72. transform: translate(-50%, -50%);
  73. &--horizontal {
  74. top: 50%;
  75. left: 0%;
  76. }
  77. &--vertical {
  78. top: 0%;
  79. left: 50%;
  80. }
  81. }
  82. &__thumb {
  83. width: $slider-thumb-size;
  84. height: $slider-thumb-size;
  85. background-color: $slider-thumb-color;
  86. border-radius: $slider-thumb-radius;
  87. border-style: solid;
  88. border-color: $slider-thumb-border-color;
  89. border-width: 1px;
  90. box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.3);//0 1px 10px rgba(0, 0, 0, 0.05);
  91. // box-shadow: $shadow-1;
  92. }
  93. }