2019-04-16 21:59:25 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@dropdown-prefix-cls: ~'@{ant-prefix}-dropdown';
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{dropdown-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: -9999px;
|
2016-03-28 16:01:37 +08:00
|
|
|
z-index: @zindex-dropdown;
|
2015-06-09 15:21:44 +08:00
|
|
|
display: block;
|
2015-06-15 20:36:49 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2018-12-07 12:12:53 +08:00
|
|
|
position: absolute;
|
|
|
|
top: -7px;
|
2018-12-19 16:04:50 +08:00
|
|
|
right: 0;
|
2018-12-07 12:12:53 +08:00
|
|
|
bottom: -7px;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: -7px;
|
2019-01-28 18:10:30 +08:00
|
|
|
z-index: -9999;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0.0001;
|
|
|
|
content: ' ';
|
2018-12-07 12:12:53 +08:00
|
|
|
}
|
|
|
|
|
2015-06-15 20:36:49 +08:00
|
|
|
&-wrap {
|
|
|
|
position: relative;
|
2015-10-09 14:38:26 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-btn > .@{iconfont-css-prefix}-down {
|
2016-12-03 17:31:04 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
2015-10-09 14:38:26 +08:00
|
|
|
}
|
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{iconfont-css-prefix}-down::before {
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: transform 0.2s;
|
2015-06-17 17:30:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-wrap-open {
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{iconfont-css-prefix}-down::before {
|
2016-04-27 20:44:36 +08:00
|
|
|
transform: rotate(180deg);
|
2015-06-17 17:30:25 +08:00
|
|
|
}
|
2015-06-15 20:36:49 +08:00
|
|
|
}
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2015-12-31 17:34:04 +08:00
|
|
|
&-hidden,
|
|
|
|
&-menu-hidden {
|
2015-06-15 21:18:08 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
&-menu {
|
|
|
|
position: relative;
|
2015-06-17 20:09:47 +08:00
|
|
|
margin: 0;
|
2019-12-10 09:02:53 +08:00
|
|
|
padding: @dropdown-edge-child-vertical-padding 0;
|
2015-06-09 15:21:44 +08:00
|
|
|
text-align: left;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style-type: none;
|
2019-11-28 21:43:54 +08:00
|
|
|
background-color: @dropdown-menu-bg;
|
2019-02-15 10:48:07 +08:00
|
|
|
background-clip: padding-box;
|
2015-11-05 21:25:43 +08:00
|
|
|
border-radius: @border-radius-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
outline: none;
|
2015-12-02 11:53:37 +08:00
|
|
|
box-shadow: @box-shadow-base;
|
2018-12-20 03:25:09 +08:00
|
|
|
-webkit-transform: translate3d(0, 0, 0);
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2017-09-25 21:28:00 +08:00
|
|
|
&-item-group-title {
|
2017-09-27 22:32:49 +08:00
|
|
|
padding: 5px @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @text-color-secondary;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2017-09-25 21:28:00 +08:00
|
|
|
}
|
|
|
|
|
2017-11-21 10:06:26 +08:00
|
|
|
&-submenu-popup {
|
|
|
|
position: absolute;
|
2018-02-09 15:56:34 +08:00
|
|
|
z-index: @zindex-dropdown;
|
2020-04-15 23:00:51 +08:00
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
2018-10-31 22:25:21 +08:00
|
|
|
|
|
|
|
> .@{dropdown-prefix-cls}-menu {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
}
|
2019-10-10 11:40:30 +08:00
|
|
|
|
|
|
|
ul,
|
|
|
|
li {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
margin-right: 0.3em;
|
|
|
|
margin-left: 0.3em;
|
|
|
|
}
|
2017-11-21 10:06:26 +08:00
|
|
|
}
|
|
|
|
|
2015-12-31 17:34:04 +08:00
|
|
|
&-item,
|
|
|
|
&-submenu-title {
|
2015-06-09 15:21:44 +08:00
|
|
|
clear: both;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin: 0;
|
2019-06-06 17:39:34 +08:00
|
|
|
padding: @dropdown-vertical-padding @control-padding-horizontal;
|
2016-11-08 20:50:59 +08:00
|
|
|
color: @text-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-weight: normal;
|
2019-06-06 17:39:34 +08:00
|
|
|
font-size: @dropdown-font-size;
|
|
|
|
line-height: @dropdown-line-height;
|
2015-06-09 15:21:44 +08:00
|
|
|
white-space: nowrap;
|
2015-07-13 18:42:08 +08:00
|
|
|
cursor: pointer;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2020-05-10 23:53:29 +08:00
|
|
|
> .@{iconfont-css-prefix}:first-child,
|
|
|
|
> span > .@{iconfont-css-prefix}:first-child {
|
2018-06-06 11:53:50 +08:00
|
|
|
min-width: 12px;
|
|
|
|
margin-right: 8px;
|
2019-10-10 11:40:30 +08:00
|
|
|
font-size: @font-size-sm;
|
2018-06-06 11:53:50 +08:00
|
|
|
}
|
|
|
|
|
2015-11-16 14:42:38 +08:00
|
|
|
> a {
|
|
|
|
display: block;
|
2017-09-27 22:32:49 +08:00
|
|
|
margin: -5px -@control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 5px @control-padding-horizontal;
|
|
|
|
color: @text-color;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2019-12-25 15:44:58 +08:00
|
|
|
&:hover {
|
|
|
|
color: @text-color;
|
|
|
|
}
|
2015-06-17 17:36:29 +08:00
|
|
|
}
|
|
|
|
|
2019-12-10 09:02:53 +08:00
|
|
|
&:first-child {
|
|
|
|
& when (@dropdown-edge-child-vertical-padding = 0) {
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
& when (@dropdown-edge-child-vertical-padding = 0) {
|
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-23 13:48:38 +08:00
|
|
|
&-selected,
|
|
|
|
&-selected > a {
|
2019-06-04 19:25:33 +08:00
|
|
|
color: @dropdown-selected-color;
|
2017-05-03 22:57:14 +08:00
|
|
|
background-color: @item-active-bg;
|
2017-02-23 13:48:38 +08:00
|
|
|
}
|
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
&:hover {
|
2017-05-03 22:57:14 +08:00
|
|
|
background-color: @item-hover-bg;
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-disabled {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-06-09 15:21:44 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
|
|
&:hover {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2019-12-01 22:45:19 +08:00
|
|
|
background-color: @dropdown-menu-submenu-disabled-bg;
|
2015-06-09 15:21:44 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-divider {
|
|
|
|
height: 1px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin: 4px 0;
|
2015-06-09 15:21:44 +08:00
|
|
|
overflow: hidden;
|
|
|
|
line-height: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
background-color: @border-color-split;
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
2019-11-05 19:26:00 +08:00
|
|
|
|
2017-09-12 16:46:33 +08:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow {
|
|
|
|
position: absolute;
|
2017-09-27 22:32:49 +08:00
|
|
|
right: @padding-xs;
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2018-08-24 11:51:52 +08:00
|
|
|
&-icon {
|
2020-03-11 11:23:39 +08:00
|
|
|
margin-right: 0 !important;
|
2017-09-12 16:46:33 +08:00
|
|
|
color: @text-color-secondary;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-style: normal;
|
2017-09-12 16:46:33 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
|
|
|
}
|
|
|
|
}
|
2015-12-31 17:34:04 +08:00
|
|
|
}
|
|
|
|
|
2019-11-05 19:26:00 +08:00
|
|
|
&-item-group-list {
|
|
|
|
margin: 0 8px;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
&-submenu-title {
|
2020-03-04 11:53:15 +08:00
|
|
|
padding-right: @control-padding-horizontal + @font-size-sm;
|
2017-09-27 22:32:49 +08:00
|
|
|
}
|
|
|
|
|
2015-12-31 17:34:04 +08:00
|
|
|
&-submenu-vertical {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-vertical > & {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: absolute;
|
2015-12-31 17:34:04 +08:00
|
|
|
top: 0;
|
|
|
|
left: 100%;
|
|
|
|
min-width: 100%;
|
|
|
|
margin-left: 4px;
|
2015-12-31 17:55:45 +08:00
|
|
|
transform-origin: 0 0;
|
2015-12-31 17:34:04 +08:00
|
|
|
}
|
|
|
|
|
2017-06-22 14:41:18 +08:00
|
|
|
&-submenu&-submenu-disabled .@{dropdown-prefix-cls}-menu-submenu-title {
|
|
|
|
&,
|
2018-08-24 11:51:52 +08:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow-icon {
|
2017-06-22 14:41:18 +08:00
|
|
|
color: @disabled-color;
|
2019-12-01 22:45:19 +08:00
|
|
|
background-color: @dropdown-menu-submenu-disabled-bg;
|
2019-02-20 15:17:14 +08:00
|
|
|
cursor: not-allowed;
|
2017-06-22 14:41:18 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-20 19:23:38 +08:00
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/19264
|
|
|
|
&-submenu-selected &-submenu-title {
|
|
|
|
color: @primary-color;
|
|
|
|
}
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
2015-10-26 14:26:51 +08:00
|
|
|
|
2017-02-09 15:44:33 +08:00
|
|
|
&.slide-down-enter.slide-down-enter-active&-placement-bottomLeft,
|
|
|
|
&.slide-down-appear.slide-down-appear-active&-placement-bottomLeft,
|
|
|
|
&.slide-down-enter.slide-down-enter-active&-placement-bottomCenter,
|
|
|
|
&.slide-down-appear.slide-down-appear-active&-placement-bottomCenter,
|
|
|
|
&.slide-down-enter.slide-down-enter-active&-placement-bottomRight,
|
|
|
|
&.slide-down-appear.slide-down-appear-active&-placement-bottomRight {
|
2015-10-26 14:26:51 +08:00
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
2017-02-09 15:44:33 +08:00
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topCenter,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topCenter,
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
|
2015-10-26 14:26:51 +08:00
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
}
|
|
|
|
|
2017-02-09 15:44:33 +08:00
|
|
|
&.slide-down-leave.slide-down-leave-active&-placement-bottomLeft,
|
|
|
|
&.slide-down-leave.slide-down-leave-active&-placement-bottomCenter,
|
|
|
|
&.slide-down-leave.slide-down-leave-active&-placement-bottomRight {
|
2015-10-26 14:26:51 +08:00
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
}
|
|
|
|
|
2017-02-09 15:44:33 +08:00
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topCenter,
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
|
2015-10-26 14:26:51 +08:00
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
}
|
2015-06-17 17:30:25 +08:00
|
|
|
}
|
2015-07-12 13:15:05 +08:00
|
|
|
|
2016-12-03 17:31:04 +08:00
|
|
|
.@{dropdown-prefix-cls}-trigger,
|
2020-05-17 01:16:12 +08:00
|
|
|
.@{dropdown-prefix-cls}-link,
|
|
|
|
.@{dropdown-prefix-cls}-button {
|
2018-12-05 11:01:48 +08:00
|
|
|
> .@{iconfont-css-prefix}.@{iconfont-css-prefix}-down {
|
2020-05-17 01:16:12 +08:00
|
|
|
vertical-align: baseline;
|
2016-12-03 17:31:04 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
2015-07-12 13:15:05 +08:00
|
|
|
}
|
|
|
|
}
|
2015-12-02 15:18:15 +08:00
|
|
|
|
|
|
|
.@{dropdown-prefix-cls}-button {
|
2016-12-24 23:12:37 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
|
2020-05-10 23:53:29 +08:00
|
|
|
&.@{ant-prefix}-btn-group
|
|
|
|
> .@{ant-prefix}-btn:last-child:not(:first-child):not(.@{ant-prefix}-btn-icon-only) {
|
2017-09-27 22:32:49 +08:00
|
|
|
padding-right: @padding-xs;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding-left: @padding-xs;
|
2015-12-02 15:18:15 +08:00
|
|
|
}
|
|
|
|
}
|
2017-02-18 15:24:25 +08:00
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/4903
|
|
|
|
.@{dropdown-prefix-cls}-menu-dark {
|
|
|
|
&,
|
|
|
|
.@{dropdown-prefix-cls}-menu {
|
|
|
|
background: @menu-dark-bg;
|
|
|
|
}
|
|
|
|
.@{dropdown-prefix-cls}-menu-item,
|
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-title,
|
|
|
|
.@{dropdown-prefix-cls}-menu-item > a {
|
|
|
|
color: @text-color-secondary-dark;
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow::after {
|
2017-02-18 15:24:25 +08:00
|
|
|
color: @text-color-secondary-dark;
|
|
|
|
}
|
|
|
|
&:hover {
|
2018-12-04 13:11:31 +08:00
|
|
|
color: @text-color-inverse;
|
2017-02-18 15:24:25 +08:00
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.@{dropdown-prefix-cls}-menu-item-selected {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
> a {
|
2018-12-04 13:11:31 +08:00
|
|
|
color: @text-color-inverse;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @primary-color;
|
2017-02-18 15:24:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 12:13:24 +08:00
|
|
|
|
|
|
|
@import './rtl';
|