ant-design/components/cascader/style/index.less

200 lines
4.4 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";
@cascader-prefix-cls: ~"@{ant-prefix}-cascader";
2015-12-29 22:34:23 +08:00
.@{cascader-prefix-cls} {
2015-12-29 11:46:13 +08:00
font-size: @font-size-base;
&-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;
2015-12-29 22:34:23 +08:00
cursor: pointer;
width: 100%;
z-index: 1;
2015-12-29 11:46:13 +08:00
}
2015-12-29 21:18:27 +08:00
&-picker {
position: relative;
display: inline-block;
2015-12-29 22:34:23 +08:00
cursor: pointer;
font-size: @font-size-base;
background-color: #fff;
border-radius: @border-radius-base;
outline: 0;
2015-12-29 22:34:23 +08:00
&-with-value &-label {
color: transparent;
}
2016-02-25 12:07:44 +08:00
&-disabled {
cursor: not-allowed;
background: @input-disabled-bg;
color: @disabled-color;
.@{cascader-prefix-cls}-input {
cursor: not-allowed;
}
2016-02-25 12:07:44 +08:00
}
&:focus .@{cascader-prefix-cls}-input {
.active;
}
&-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 12px 0 8px;
}
2015-12-29 21:18:27 +08:00
&-clear {
opacity: 0;
position: absolute;
right: 8px;
2016-08-02 17:19:54 +08:00
z-index: 2;
2015-12-29 22:34:23 +08:00
background: #fff;
2015-12-29 21:18:27 +08:00
top: 50%;
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
color: @disabled-color;
2015-12-29 21:18:27 +08:00
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;
2015-12-29 21:18:27 +08:00
}
}
2015-12-29 22:34:23 +08:00
2015-12-29 21:18:27 +08:00
&:hover &-clear {
opacity: 1;
2015-12-29 22:34:23 +08:00
}
// arrow
&-arrow {
position: absolute;
2016-08-02 17:19:54 +08:00
z-index: 1;
2015-12-29 22:34:23 +08:00
top: 50%;
right: 8px;
width: 12px;
height: 12px;
margin-top: -6px;
line-height: 12px;
color: @text-color-secondary;
.iconfont-size-under-12px(9px);
2015-12-29 22:34:23 +08:00
&:before {
transition: transform 0.2s ease;
}
&&-expand {
.ie-rotate(2);
&:before {
transform: rotate(180deg);
2015-12-29 22:34:23 +08:00
}
}
2015-12-29 21:18:27 +08:00
}
}
2015-12-29 11:46:13 +08:00
&-menus {
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
2015-12-29 11:46:13 +08:00
background: #fff;
position: absolute;
2016-04-13 16:16:26 +08:00
z-index: @zindex-dropdown;
2015-12-29 11:46:13 +08:00
border-radius: @border-radius-base;
box-shadow: @box-shadow-base;
2016-01-19 18:01:21 +08:00
white-space: nowrap;
2016-01-27 15:26:39 +08:00
&-empty,
2015-12-29 11:46:13 +08:00
&-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 {
2016-01-19 18:01:21 +08:00
display: inline-block;
vertical-align: top;
2016-01-07 20:58:13 +08:00
min-width: 111px;
2015-12-29 11:46:13 +08:00
height: 180px;
list-style: none;
margin: 0;
padding: 0;
border-right: @border-width-base @border-style-base @border-color-split;
2015-12-31 11:49:17 +08:00
overflow: auto;
2016-04-13 16:32:25 +08:00
&:first-child {
border-radius: @border-radius-base 0 0 @border-radius-base;
}
2015-12-29 11:46:13 +08:00
&:last-child {
border-right-color: transparent;
margin-right: -1px;
2016-04-13 16:32:25 +08:00
border-radius: 0 @border-radius-base @border-radius-base 0;
}
&:only-child {
border-radius: @border-radius-base;
2015-12-29 11:46:13 +08:00
}
}
&-menu-item {
padding: 7px 26px 7px 16px;
2015-12-29 11:46:13 +08:00
cursor: pointer;
white-space: nowrap;
transition: all 0.3s ease;
&:hover {
background: @primary-1;
2015-12-29 11:46:13 +08:00
}
2016-01-25 15:31:08 +08:00
&-disabled {
cursor: not-allowed;
color: @disabled-color;
2016-01-25 15:31:08 +08:00
&:hover {
background: transparent;
}
}
&-active:not(&-disabled) {
&,
2015-12-29 11:46:13 +08:00
&:hover {
2016-07-21 15:02:24 +08:00
background-color: @background-color-base;
font-weight: bold;
2015-12-29 11:46:13 +08:00
}
}
&-expand {
position: relative;
&:after {
.iconfont-font("\e61f");
2015-12-29 11:46:13 +08:00
.iconfont-size-under-12px(8px);
color: @text-color-secondary;
2015-12-29 11:46:13 +08:00
position: absolute;
right: 15px;
}
}
&-loading:after {
.iconfont-font("\e64d");
animation: loadingCircle 1s infinite linear;
}
& &-keyword {
2016-11-09 21:30:02 +08:00
color: @highlight-color;
}
2015-12-29 11:46:13 +08:00
}
}