Blame view

src/styles/components/cascader.less 3.4 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
22
23
24
      .@{css-prefix}input{
          display: block;
          cursor: pointer;
      }
05b5dd7b   梁灏   update Cascader
25
26
27
      &-disabled .@{css-prefix}input{
          cursor: @cursor-disabled;
      }
c463ab87   梁灏   add Cascader
28
  
3ae11e85   梁灏   update Cascader
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
      &-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
      .@{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
67
68
          .inner-arrow();
      }
e2645048   jingsam   :fire: remove tra...
69
70
      &-visible &-arrow:nth-of-type(2) {
          transform: rotate(180deg);
c463ab87   梁灏   add Cascader
71
72
73
      }
  
      .@{select-dropdown-prefix-cls} {
a9cd43b3   梁灏   Cascader add tran...
74
          .selectDropDown();
c463ab87   梁灏   add Cascader
75
76
77
      }
  
      .select-item(@cascader-prefix-cls, @cascader-item-prefix-cls);
4e23e47c   梁灏   update Cascader
78
79
80
      .ivu-select-item span{
          color: @error-color;
      }
c463ab87   梁灏   add Cascader
81
  
7ec0b533   梁灏   Cascader support ...
82
83
      &-dropdown{
          padding: 5px 0;
a28bc982   梁灏   update Cascader s...
84
85
86
87
88
          .@{select-dropdown-prefix-cls}-list{
              max-height: 190px;
              box-sizing: border-box;
              overflow: auto;
          }
7ec0b533   梁灏   Cascader support ...
89
90
      }
  
952ddb51   梁灏   update Cascader
91
92
93
94
      &-not-found-tip{
          padding: 5px 0;
          text-align: center;
          color: @btn-disable-color;
a28bc982   梁灏   update Cascader s...
95
96
97
          li:not([class^=ivu-]){
              margin-bottom: 0;
          }
952ddb51   梁灏   update Cascader
98
99
      }
      &-not-found .@{select-dropdown-prefix-cls} {
638590f5   梁灏   update Cascader
100
          width: inherit;
952ddb51   梁灏   update Cascader
101
102
      }
  
c463ab87   梁灏   add Cascader
103
104
105
106
107
      &-menu{
          display: inline-block;
          min-width: 100px;
          height: 180px;
          margin: 0;
9ec927b1   梁灏   update Cascader
108
          padding: 5px 0 !important;
c463ab87   梁灏   add Cascader
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
          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;
              padding-right: 24px;
e2645048   jingsam   :fire: remove tra...
128
              transition: all @transition-time @ease-in-out;
c463ab87   梁灏   add Cascader
129
130
131
132
133
134
135
136
137
138
139
  
              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
140
                  color: @primary-color;
c463ab87   梁灏   add Cascader
141
142
143
              }
          }
      }
e2645048   jingsam   :fire: remove tra...
144
  }
a9cd43b3   梁灏   Cascader add tran...
145
146
147
148
149
150
151
152
  .@{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;
      }
  }
e93f1e9a   梁灏   update some styles
153
154
155
156
157
158
159
160
  
  .@{form-item-prefix-cls}-error{
      .@{cascader-prefix-cls} {
          &-arrow{
              color: @error-color;
          }
      }
  }