You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
4.9 KiB

6 years ago
@import '../../style/themes/default';
@import '../../style/mixins/index';
@import '../../input/style/mixin';
6 years ago
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
9 years ago
.@{cascader-prefix-cls} {
.reset-component;
&-input.@{ant-prefix}-input {
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
// because input.less will compile after cascader.less
background-color: transparent !important;
9 years ago
cursor: pointer;
width: 100%;
position: relative;
9 years ago
}
&-picker-show-search &-input.@{ant-prefix}-input {
position: relative;
}
9 years ago
&-picker {
.reset-component;
9 years ago
position: relative;
display: inline-block;
9 years ago
cursor: pointer;
background-color: @component-background;
border-radius: @border-radius-base;
outline: 0;
6 years ago
transition: color 0.3s;
9 years ago
&-with-value &-label {
color: transparent;
}
&-disabled {
cursor: not-allowed;
background: @input-disabled-bg;
color: @disabled-color;
.@{cascader-prefix-cls}-input {
cursor: not-allowed;
}
}
&:focus .@{cascader-prefix-cls}-input {
.active;
}
&-show-search&-focused {
color: @disabled-color;
}
&-label {
position: absolute;
left: 0;
height: 20px;
line-height: 20px;
top: 50%;
margin-top: -10px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
padding: 0 @control-padding-horizontal;
}
9 years ago
&-clear {
opacity: 0;
position: absolute;
right: @control-padding-horizontal;
z-index: 2;
background: @component-background;
9 years ago
top: 50%;
font-size: @font-size-sm;
color: @disabled-color;
9 years ago
width: 12px;
height: 12px;
margin-top: -6px;
line-height: 12px;
cursor: pointer;
transition: color 0.3s ease, opacity 0.15s ease;
&:hover {
color: @text-color-secondary;
9 years ago
}
}
9 years ago
9 years ago
&:hover &-clear {
opacity: 1;
9 years ago
}
// arrow
&-arrow {
position: absolute;
z-index: 1;
9 years ago
top: 50%;
right: @control-padding-horizontal;
9 years ago
width: 12px;
height: 12px;
font-size: 12px;
9 years ago
margin-top: -6px;
line-height: 12px;
color: @disabled-color;
6 years ago
transition: transform 0.2s;
9 years ago
&&-expand {
transform: rotate(180deg);
9 years ago
}
9 years ago
}
}
&-picker-small &-picker-clear,
&-picker-small &-picker-arrow {
right: @control-padding-horizontal-sm;
}
9 years ago
&-menus {
font-size: @font-size-base;
background: @component-background;
9 years ago
position: absolute;
z-index: @zindex-dropdown;
9 years ago
border-radius: @border-radius-base;
box-shadow: @box-shadow-base;
white-space: nowrap;
ul,
ol {
list-style: none;
margin: 0;
padding: 0;
}
&-empty,
9 years ago
&-hidden {
display: none;
}
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
animation-name: antSlideUpIn;
}
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
animation-name: antSlideDownIn;
}
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
animation-name: antSlideUpOut;
}
&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
animation-name: antSlideDownOut;
}
}
&-menu {
display: inline-block;
vertical-align: top;
min-width: 111px;
9 years ago
height: 180px;
list-style: none;
margin: 0;
padding: 0;
border-right: @border-width-base @border-style-base @border-color-split;
overflow: auto;
-ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
&:first-child {
border-radius: @border-radius-base 0 0 @border-radius-base;
}
9 years ago
&:last-child {
border-right-color: transparent;
margin-right: -1px;
border-radius: 0 @border-radius-base @border-radius-base 0;
}
&:only-child {
border-radius: @border-radius-base;
9 years ago
}
}
&-menu-item {
padding: 5px @control-padding-horizontal;
line-height: 22px;
9 years ago
cursor: pointer;
white-space: nowrap;
transition: all 0.3s;
9 years ago
&:hover {
background: @item-hover-bg;
9 years ago
}
&-disabled {
cursor: not-allowed;
color: @disabled-color;
&:hover {
background: transparent;
}
}
&-active:not(&-disabled) {
&,
9 years ago
&:hover {
background: @background-color-base;
font-weight: 600;
9 years ago
}
}
&-expand {
position: relative;
padding-right: 24px;
9 years ago
}
&-expand &-expand-icon,
&-expand &-loading-icon {
.iconfont-size-under-12px(10px);
color: @text-color-secondary;
position: absolute;
right: @control-padding-horizontal;
}
& &-keyword {
color: @highlight-color;
}
9 years ago
}
}