Blame view

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