Blame view

src/styles/components/slider.less 2.34 KB
69576f47   梁灏   add Slider component
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  @slider-prefix-cls: ~"@{css-prefix}slider";
  
  .@{slider-prefix-cls} {
      &-wrap{
          width: 100%;
          height: @slider-height;
          margin: @slider-margin;
          background-color: @border-color-split;
          border-radius: @btn-border-radius-small;
          vertical-align: middle;
          position: relative;
          cursor: pointer;
      }
  
      &-button-wrap{
          .square(@slider-button-wrap-size);
          text-align: center;
          background-color: transparent;
          position: absolute;
          top: @slider-button-wrap-offset;
e2645048   jingsam   :fire: remove tra...
21
          transform: translateX(-50%);
69576f47   梁灏   add Slider component
22
23
24
  
          .@{tooltip-prefix-cls} {
              display: block;
e2645048   jingsam   :fire: remove tra...
25
              user-select: none;
69576f47   梁灏   add Slider component
26
27
28
29
30
31
32
33
34
          }
      }
  
      &-button{
          width: 12px;
          height: 12px;
          border: 2px solid @slider-color;
          border-radius: 50%;
          background-color: #fff;
e2645048   jingsam   :fire: remove tra...
35
          transition: all @transition-time linear;
69576f47   梁灏   add Slider component
36
37
38
39
40
  
          &:hover,
          &-dragging
          {
              border-color: @primary-color;
e2645048   jingsam   :fire: remove tra...
41
              transform: scale(1.5);
69576f47   梁灏   add Slider component
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
          }
  
          &:hover{
              cursor: grab;
          }
          &-dragging,
          &-dragging:hover
          {
              cursor: grabbing;
          }
      }
  
      &-bar{
          height: @slider-height;
          background: @slider-color;
          border-radius: @btn-border-radius-small;
          position: absolute;
      }
41d90ccf   梁灏   Slider can show s...
60
61
62
63
64
65
  
      &-stop{
          position: absolute;
          .square(@slider-height);
          border-radius: 50%;
          background-color: @slider-disabled-color;
e2645048   jingsam   :fire: remove tra...
66
          transform: translateX(-50%);
41d90ccf   梁灏   Slider can show s...
67
      }
69576f47   梁灏   add Slider component
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  }
  
  .@{slider-prefix-cls}-disabled{
      cursor: @cursor-disabled;
  
      .@{slider-prefix-cls}-wrap{
          background-color: @slider-disabled-color;
          cursor: @cursor-disabled;
      }
      .@{slider-prefix-cls}-bar{
          background-color: @slider-disabled-color;
      }
  
      .@{slider-prefix-cls}-button{
          border-color: @slider-disabled-color;
  
          &:hover,
          &-dragging
          {
              border-color: @slider-disabled-color;
          }
          &:hover{
              cursor: @cursor-disabled;
          }
          &-dragging,
          &-dragging:hover
          {
              cursor: @cursor-disabled;
          }
      }
  }
  
  .@{slider-prefix-cls}-input{
      .@{slider-prefix-cls}-wrap{
          width: auto;
          margin-right: 100px;
      }
  
      .@{input-number-prefix-cls}{
          float: right;
          margin-top: -14px;
      }
e2645048   jingsam   :fire: remove tra...
110
  }