UNPKG

2.37 kBtext/lessView Raw
1@import '../../style/themes/index';
2@import '../../style/mixins/index';
3@import '../../input/style/mixin';
4@import '../../checkbox/style/mixin';
5
6@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
7
8.antCheckboxFn(@checkbox-prefix-cls: ~'@{cascader-prefix-cls}-checkbox');
9
10.@{cascader-prefix-cls} {
11 width: 184px;
12
13 &-checkbox {
14 top: 0;
15 margin-right: @padding-xs;
16 }
17
18 &-menus {
19 display: flex;
20 flex-wrap: nowrap;
21 align-items: flex-start;
22
23 &.@{cascader-prefix-cls}-menu-empty {
24 .@{cascader-prefix-cls}-menu {
25 width: 100%;
26 height: auto;
27 }
28 }
29 }
30
31 &-menu {
32 flex-grow: 1;
33 min-width: 111px;
34 height: 180px;
35 margin: 0;
36 margin: -@dropdown-edge-child-vertical-padding 0;
37 padding: @cascader-dropdown-edge-child-vertical-padding 0;
38 overflow: auto;
39 vertical-align: top;
40 list-style: none;
41 border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
42 -ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
43
44 &-item {
45 display: flex;
46 flex-wrap: nowrap;
47 align-items: center;
48 padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
49 overflow: hidden;
50 line-height: @cascader-dropdown-line-height;
51 white-space: nowrap;
52 text-overflow: ellipsis;
53 cursor: pointer;
54 transition: all 0.3s;
55
56 &:hover {
57 background: @item-hover-bg;
58 }
59
60 &-disabled {
61 color: @disabled-color;
62 cursor: not-allowed;
63
64 &:hover {
65 background: transparent;
66 }
67 }
68
69 .@{cascader-prefix-cls}-menu-empty & {
70 color: @disabled-color;
71 cursor: default;
72 pointer-events: none;
73 }
74
75 &-active:not(&-disabled) {
76 &,
77 &:hover {
78 font-weight: @select-item-selected-font-weight;
79 background-color: @cascader-item-selected-bg;
80 }
81 }
82
83 &-content {
84 flex: auto;
85 }
86
87 &-expand &-expand-icon,
88 &-loading-icon {
89 margin-left: @padding-xss;
90 color: @text-color-secondary;
91 font-size: 10px;
92
93 .@{cascader-prefix-cls}-menu-item-disabled& {
94 color: @disabled-color;
95 }
96 }
97
98 &-keyword {
99 color: @highlight-color;
100 }
101 }
102 }
103}
104
105@import './rtl';