Blame view

src/styles/components/cascader.less 3.8 KB
c463ab87   梁灏   add Cascader
1
2
3
  @cascader-prefix-cls: ~"@{css-prefix}cascader";
  @cascader-item-prefix-cls: ~"@{css-prefix}cascader-menu-item";
  
a9cd43b3   梁灏   Cascader add tran...
4
5
6
7
8
9
10
  .selectDropDown{
      width: auto;
      padding: 0;
      white-space: nowrap;
      overflow: visible;
  }
  
c463ab87   梁灏   add Cascader
11
  .@{cascader-prefix-cls} {
75e5c6a5   梁灏   Cascader support ...
12
      //position: relative;
3b005863   梁灏   update Cascader
13
      line-height: normal;
c463ab87   梁灏   add Cascader
14
  
75e5c6a5   梁灏   Cascader support ...
15
      &-rel{
5ee64b6d   梁灏   fixed #430
16
17
          display: inline-block;
          width: 100%;
75e5c6a5   梁灏   Cascader support ...
18
19
20
          position: relative;
      }
  
c463ab87   梁灏   add Cascader
21
      .@{css-prefix}input{
7c7ffd18   yang   Cascader不允许超出下拉图标...
22
          padding-right: 24px;
c463ab87   梁灏   add Cascader
23
24
25
          display: block;
          cursor: pointer;
      }
05b5dd7b   梁灏   update Cascader
26
27
28
      &-disabled .@{css-prefix}input{
          cursor: @cursor-disabled;
      }
c463ab87   梁灏   add Cascader
29
  
3ae11e85   梁灏   update Cascader
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
      &-label{
          width: 100%;
          height: 100%;
          line-height: 32px;
          padding: 0 7px;
          box-sizing: border-box;
          white-space: nowrap;
          text-overflow: ellipsis;
          overflow: hidden;
          cursor: pointer;
          font-size: @font-size-small;
          position: absolute;
          left: 0;
          top: 0;
      }
      &-size-large &-label{
          line-height: 36px;
          font-size: @font-size-base;
      }
      &-size-small &-label{
          line-height: 26px;
      }
  
c463ab87   梁灏   add Cascader
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
      .@{cascader-prefix-cls}-arrow:nth-of-type(1) {
          display: none;
          cursor: pointer;
      }
  
      &:hover {
          .@{cascader-prefix-cls}-arrow:nth-of-type(1) {
              display: inline-block;
          }
      }
      &-show-clear:hover .@{cascader-prefix-cls}-arrow:nth-of-type(2){
          display: none;
      }
  
      &-arrow {
165bb7c9   梁灏   update Cascader
68
69
          .inner-arrow();
      }
e2645048   jingsam   :fire: remove tra...
70
71
      &-visible &-arrow:nth-of-type(2) {
          transform: rotate(180deg);
c463ab87   梁灏   add Cascader
72
73
74
      }
  
      .@{select-dropdown-prefix-cls} {
a9cd43b3   梁灏   Cascader add tran...
75
          .selectDropDown();
c463ab87   梁灏   add Cascader
76
77
78
      }
  
      .select-item(@cascader-prefix-cls, @cascader-item-prefix-cls);
4e23e47c   梁灏   update Cascader
79
80
81
      .ivu-select-item span{
          color: @error-color;
      }
c463ab87   梁灏   add Cascader
82
  
7ec0b533   梁灏   Cascader support ...
83
84
      &-dropdown{
          padding: 5px 0;
a28bc982   梁灏   update Cascader s...
85
86
87
88
89
          .@{select-dropdown-prefix-cls}-list{
              max-height: 190px;
              box-sizing: border-box;
              overflow: auto;
          }
7ec0b533   梁灏   Cascader support ...
90
91
      }
  
952ddb51   梁灏   update Cascader
92
93
94
95
      &-not-found-tip{
          padding: 5px 0;
          text-align: center;
          color: @btn-disable-color;
a28bc982   梁灏   update Cascader s...
96
          li:not([class^=ivu-]){
47dc36c5   梁灏   fixed Cascader st...
97
              list-style: none;
a28bc982   梁灏   update Cascader s...
98
99
              margin-bottom: 0;
          }
952ddb51   梁灏   update Cascader
100
101
      }
      &-not-found .@{select-dropdown-prefix-cls} {
638590f5   梁灏   update Cascader
102
          width: inherit;
952ddb51   梁灏   update Cascader
103
104
      }
  
c463ab87   梁灏   add Cascader
105
106
107
108
109
      &-menu{
          display: inline-block;
          min-width: 100px;
          height: 180px;
          margin: 0;
9ec927b1   梁灏   update Cascader
110
          padding: 5px 0 !important;
c463ab87   梁灏   add Cascader
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
          vertical-align: top;
          list-style: none;
          border-right: 1px solid @border-color-split;
          overflow: auto;
  
          &:first-child {
  
          }
          &:last-child {
              border-right-color: transparent;
              margin-right: -1px;
          }
          &:only-child {
  
          }
  
          & &-item{
              position: relative;
bb9f1932   梁灏   update Cascader s...
129
              padding-right: 36px;
e2645048   jingsam   :fire: remove tra...
130
              transition: all @transition-time @ease-in-out;
c463ab87   梁灏   add Cascader
131
132
133
134
135
136
137
138
139
140
141
  
              i{
                  font-size: @font-size-small;
                  position: absolute;
                  right: 15px;
                  top: 50%;
                  margin-top: -6px;
              }
  
              &-active{
                  background-color: @background-color-select-hover;
165bb7c9   梁灏   update Cascader
142
                  color: @primary-color;
c463ab87   梁灏   add Cascader
143
144
145
              }
          }
      }
e2645048   jingsam   :fire: remove tra...
146
  }
a9cd43b3   梁灏   Cascader add tran...
147
148
149
150
151
152
153
  .@{cascader-prefix-cls}-transfer{
      z-index: @zindex-transfer;
      .selectDropDown();
      .select-item(@cascader-prefix-cls, @cascader-item-prefix-cls);
      .ivu-select-item span{
          color: @error-color;
      }
0e4166bd   梁灏   fixed #1728
154
155
156
157
158
159
160
161
162
163
164
165
      .@{cascader-prefix-cls} {
          &-menu{
              &-item{
                  padding-right: 24px;
                  transition: all @transition-time @ease-in-out;
                  &-active{
                      background-color: @background-color-select-hover;
                      color: @primary-color;
                  }
              }
          }
      }
a9cd43b3   梁灏   Cascader add tran...
166
  }
e93f1e9a   梁灏   update some styles
167
168
169
170
171
172
173
174
  
  .@{form-item-prefix-cls}-error{
      .@{cascader-prefix-cls} {
          &-arrow{
              color: @error-color;
          }
      }
  }