Blame view

src/styles/components/time-picker.less 5.04 KB
2d948738   梁灏   update TimePicker...
1
  @time-picker-prefix-cls: ~"@{css-prefix}time-picker";
62c7f997   梁灏   update DateTimePi...
2
3
4
5
6
7
  @time-picker-cells-width-base: 56px;
  @time-picker-cells-width-with-date-base: 72px;
  @time-picker-cells-width: @time-picker-cells-width-base * 2;
  @time-picker-cells-width-with-seconds: @time-picker-cells-width-base *3;
  @time-picker-cells-width-with-date: @time-picker-cells-width-with-date-base * 2;
  @time-picker-cells-width-with-date-with-seconds: @time-picker-cells-width-with-date-base * 3;
456877a1   梁灏   update TimePicker
8
  
2d948738   梁灏   update TimePicker...
9
10
  .@{time-picker-prefix-cls} {
      &-cells{
456877a1   梁灏   update TimePicker
11
          min-width: @time-picker-cells-width;
2d948738   梁灏   update TimePicker...
12
          &-with-seconds{
456877a1   梁灏   update TimePicker
13
              min-width: @time-picker-cells-width-with-seconds;
2d948738   梁灏   update TimePicker...
14
15
16
          }
  
          &-list{
62c7f997   梁灏   update DateTimePi...
17
              width: @time-picker-cells-width-base;
2d948738   梁灏   update TimePicker...
18
              max-height: 144px;
7c4c9d9c   梁灏   update TimePicker...
19
20
              float: left;
              overflow: hidden;
2d948738   梁灏   update TimePicker...
21
              border-left: 1px solid @border-color-split;
7c4c9d9c   梁灏   update TimePicker...
22
23
24
25
26
              position: relative;
              &:hover{
                  overflow-y: auto;
              }
  
2d948738   梁灏   update TimePicker...
27
28
              &:first-child{
                  border-left: none;
d596b9e4   梁灏   update TimePicker
29
                  border-radius: @btn-border-radius 0 0 @btn-border-radius;
2d948738   梁灏   update TimePicker...
30
31
              }
              &:last-child{
d596b9e4   梁灏   update TimePicker
32
                  border-radius: 0 @btn-border-radius @btn-border-radius 0;
2d948738   梁灏   update TimePicker...
33
34
35
36
37
38
39
40
41
42
43
44
              }
              ul{
                  width: 100%;
                  margin: 0;
                  padding: 0 0 120px 0;
                  list-style: none;
                  li{
                      width: 100%;
                      height: 24px;
                      line-height: 24px;
                      margin: 0;
                      padding: 0 0 0 16px;
7c4c9d9c   梁灏   update TimePicker...
45
                      box-sizing: content-box;
2d948738   梁灏   update TimePicker...
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
                      text-align: left;
                      user-select: none;
                      cursor: pointer;
                      list-style: none;
                      transition: background @transition-time @ease-in-out;
  
                  }
              }
          }
          &-cell{
              &:hover{
                  background: @background-color-select-hover;
              }
              &-disabled {
                  color: @btn-disable-color;
                  cursor: @cursor-disabled;
  
                  &:hover {
                      color: @btn-disable-color;
                      background-color: #fff;
                      cursor: @cursor-disabled;
                  }
              }
              &-selected ,&-selected:hover{
                  color: @primary-color;
                  background: @background-color-select-hover;
              }
          }
      }
456877a1   梁灏   update TimePicker
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
  
      &-header{
          height: 32px;
          line-height: 32px;
          text-align: center;
          border-bottom: 1px solid @border-color-split;
      }
  
      &-with-range{
          .@{picker-prefix-cls}-panel{
              &-body{
                  min-width: @time-picker-cells-width * 2 + 4px;
              }
              &-content{
                  float: left;
                  position: relative;
  
                  &:after{
                      content: '';
                      display: block;
                      width: 2px;
                      position: absolute;
                      top: 31px;
                      bottom: 0;
                      right: -2px;
2dc27713   梁灏   update DateTimePi...
100
101
                      background: @border-color-split;
                      z-index: 1;
456877a1   梁灏   update TimePicker
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
                  }
  
                  &-right{
                      float: right;
                      &:after{
                          right: auto;
                          left: -2px;
                      }
                  }
              }
          }
          .@{time-picker-prefix-cls}-cells{
              &-list{
                  &:first-child{
                      border-radius: 0;
                  }
                  &:last-child{
                      border-radius: 0;
                  }
              }
          }
      }
      &-with-range&-with-seconds{
          .@{picker-prefix-cls}-panel{
              &-body{
                  min-width: @time-picker-cells-width-with-seconds * 2 + 4px;
              }
          }
      }
62c7f997   梁灏   update DateTimePi...
131
132
133
134
135
136
  }
  
  .@{picker-prefix-cls}-panel-content{
      .@{picker-prefix-cls}-panel-content{
          .@{time-picker-prefix-cls}{
              &-cells{
acde7262   梁灏   update DateTimePi...
137
                  min-width: @time-picker-cells-width-with-date-with-seconds;
62c7f997   梁灏   update DateTimePi...
138
139
                  &-with-seconds{
                      min-width: @time-picker-cells-width-with-date-with-seconds;
acde7262   梁灏   update DateTimePi...
140
141
142
143
144
145
146
147
                      .@{time-picker-prefix-cls}-cells-list{
                          width: @time-picker-cells-width-with-date-with-seconds / 3;
                          ul{
                              li{
                                  padding: 0 0 0 28px;
                              }
                          }
                      }
62c7f997   梁灏   update DateTimePi...
148
149
                  }
                  &-list {
acde7262   梁灏   update DateTimePi...
150
                      width: @time-picker-cells-width-with-date-with-seconds / 2;
a8571a5f   梁灏   update DateTimePi...
151
152
153
154
155
156
157
                      max-height: 216px;
                      &:first-child{
                          border-radius: 0;
                      }
                      &:last-child{
                          border-radius: 0;
                      }
62c7f997   梁灏   update DateTimePi...
158
                      ul{
a8571a5f   梁灏   update DateTimePi...
159
                          padding: 0 0 192px 0;
62c7f997   梁灏   update DateTimePi...
160
                          li{
acde7262   梁灏   update DateTimePi...
161
                              padding: 0 0 0 46px;
62c7f997   梁灏   update DateTimePi...
162
163
164
165
166
167
                          }
                      }
                  }
              }
          }
      }
2d948738   梁灏   update TimePicker...
168
  }