index.scss 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @import '../common/abstracts/variable';
  2. @import '../common/abstracts/mixin';
  3. .wot-theme-dark {
  4. @include b(slider) {
  5. @include e(label-min, label-max) {
  6. color: $-dark-color;
  7. }
  8. @include e(label) {
  9. color: $-dark-color;
  10. background-color: rgba($color: $-dark-background2, $alpha: 0.5);
  11. }
  12. @include m(disabled) {
  13. @include me(label-min, label-max) {
  14. color: $-dark-color-gray;
  15. }
  16. }
  17. }
  18. }
  19. @include b(slider) {
  20. display: flex;
  21. flex-flow: row nowrap;
  22. align-items: center;
  23. height: calc($-slider-handle-radius * 3);
  24. @include e(label-min, label-max) {
  25. font-size: $-slider-fs;
  26. color: $-slider-color;
  27. }
  28. @include e(label) {
  29. text-align: center;
  30. width: calc($-slider-handle-radius * 2);
  31. line-height: calc($-slider-handle-radius * 2);
  32. font-size: $-slider-fs;
  33. line-height: 1.2;
  34. color: $-slider-color;
  35. background-color: rgba($color: #fff, $alpha: 0.5);
  36. border-radius: 100%;
  37. position: absolute;
  38. bottom: calc($-slider-handle-radius * 2 + 8px);
  39. }
  40. @include e(bar-wrapper) {
  41. flex: 1;
  42. position: relative;
  43. border-radius: calc($-slider-axie-height / 2);
  44. background-color: #e5e5e5;
  45. margin: calc($-slider-handle-radius - $-slider-axie-height / 2) 0;
  46. }
  47. @include e(bar) {
  48. position: relative;
  49. border-radius: inherit;
  50. height: $-slider-axie-height;
  51. background: $-slider-line-color;
  52. }
  53. @include e(button-wrapper) {
  54. width: calc($-slider-handle-radius * 2);
  55. /* 右侧滑块按钮定位,向右偏移自身宽度的50% */
  56. transform: translate3d(50%, -50%, 0);
  57. position: absolute;
  58. right: 0;
  59. @include m(left){
  60. left: 0;
  61. /* 左侧滑块按钮定位,向左偏移自身宽度的50% */
  62. transform: translate3d(-50%, -50%, 0);
  63. }
  64. }
  65. @include e(has-label) {
  66. padding-top: calc($-slider-fs * 1.2 + 8px);
  67. }
  68. @include e(button) {
  69. height: calc($-slider-handle-radius * 2);
  70. width: calc($-slider-handle-radius * 2);
  71. background: $-slider-handle-bg;
  72. border-radius: 100%;
  73. border: 1px solid $-slider-axie-bg;
  74. box-sizing: border-box;
  75. box-shadow: 0 2px 4px 0 rgba($color: #9b9b9b, $alpha: 0.5);
  76. }
  77. @include e(label-min) {
  78. margin-right: calc($-slider-handle-radius * 2);
  79. }
  80. @include e(label-max) {
  81. margin-left: calc($-slider-handle-radius * 2);
  82. }
  83. @include m(disabled) {
  84. @include me(bar) {
  85. opacity: 0.25;
  86. }
  87. @include me(label-min, label-max) {
  88. color: $-slider-disabled-color;
  89. }
  90. }
  91. }