2016-04-27 20:44:36 +08:00
|
|
|
@import "../../style/themes/default";
|
|
|
|
@import "../../style/mixins/index";
|
|
|
|
|
2016-09-14 16:18:33 +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} {
|
2015-06-09 15:21:44 +08:00
|
|
|
position: absolute;
|
|
|
|
left: -9999px;
|
|
|
|
top: -9999px;
|
2016-03-28 16:01:37 +08:00
|
|
|
z-index: @zindex-dropdown;
|
2015-06-09 15:21:44 +08:00
|
|
|
display: block;
|
2016-11-08 20:57:07 +08:00
|
|
|
font-size: @font-size-base;
|
2015-06-09 15:21:44 +08:00
|
|
|
font-weight: normal;
|
|
|
|
line-height: 1.5;
|
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
|
|
|
}
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix}-down:before {
|
2015-06-17 17:30:25 +08:00
|
|
|
transition: transform 0.2s ease;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-wrap-open {
|
2016-09-14 16:18:33 +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 {
|
|
|
|
outline: none;
|
|
|
|
position: relative;
|
|
|
|
list-style-type: none;
|
|
|
|
padding: 0;
|
2015-06-17 20:09:47 +08:00
|
|
|
margin: 0;
|
2015-06-09 15:21:44 +08:00
|
|
|
text-align: left;
|
2016-11-29 11:56:10 +08:00
|
|
|
background-color: @component-background;
|
2015-11-05 21:25:43 +08:00
|
|
|
border-radius: @border-radius-base;
|
2015-12-02 11:53:37 +08:00
|
|
|
box-shadow: @box-shadow-base;
|
2015-06-09 15:21:44 +08:00
|
|
|
background-clip: padding-box;
|
|
|
|
|
2015-12-31 17:34:04 +08:00
|
|
|
&-item,
|
|
|
|
&-submenu-title {
|
2017-05-02 16:07:16 +08:00
|
|
|
padding: 7px 8px;
|
2015-12-31 17:34:04 +08:00
|
|
|
margin: 0;
|
2015-06-09 15:21:44 +08:00
|
|
|
clear: both;
|
2016-11-08 20:57:07 +08:00
|
|
|
font-size: @font-size-base;
|
2015-06-09 15:21:44 +08:00
|
|
|
font-weight: normal;
|
2016-11-08 20:50:59 +08:00
|
|
|
color: @text-color;
|
2015-06-09 15:21:44 +08:00
|
|
|
white-space: nowrap;
|
2015-07-13 18:42:08 +08:00
|
|
|
cursor: pointer;
|
2017-02-18 15:24:25 +08:00
|
|
|
transition: all .3s;
|
2015-06-09 15:21:44 +08:00
|
|
|
|
2015-11-16 14:42:38 +08:00
|
|
|
> a {
|
2016-11-08 20:50:59 +08:00
|
|
|
color: @text-color;
|
2015-11-16 14:42:38 +08:00
|
|
|
display: block;
|
2017-05-02 16:07:16 +08:00
|
|
|
padding: 7px 8px;
|
|
|
|
margin: -7px -8px;
|
2017-02-18 15:24:25 +08:00
|
|
|
transition: all .3s;
|
2017-04-15 15:03:57 +08:00
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2015-06-17 17:36:29 +08:00
|
|
|
}
|
|
|
|
|
2017-02-23 13:48:38 +08:00
|
|
|
&-selected,
|
|
|
|
&-selected > a {
|
|
|
|
color: @primary-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;
|
2016-11-29 11:56:10 +08:00
|
|
|
background-color: @component-background;
|
2015-06-09 15:21:44 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-18 15:24:25 +08:00
|
|
|
&:first-child,
|
|
|
|
&:first-child > a {
|
2015-12-31 17:34:04 +08:00
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
2017-02-18 15:24:25 +08:00
|
|
|
&:last-child,
|
|
|
|
&:last-child > a {
|
2015-12-31 17:34:04 +08:00
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
2015-06-09 15:21:44 +08:00
|
|
|
}
|
|
|
|
|
2017-02-18 15:24:25 +08:00
|
|
|
&:only-child,
|
|
|
|
&:only-child > a {
|
2016-04-23 15:30:23 +08:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
}
|
|
|
|
|
2015-06-09 15:21:44 +08:00
|
|
|
&-divider {
|
|
|
|
height: 1px;
|
|
|
|
overflow: hidden;
|
2015-12-02 11:53:37 +08:00
|
|
|
background-color: @border-color-split;
|
2015-06-09 15:21:44 +08:00
|
|
|
line-height: 0;
|
|
|
|
}
|
|
|
|
}
|
2015-12-31 17:34:04 +08:00
|
|
|
|
|
|
|
&-submenu-title:after {
|
|
|
|
font-family: "anticon" !important;
|
|
|
|
position: absolute;
|
2016-09-18 09:54:47 +08:00
|
|
|
content: "\e61f";
|
2017-05-02 16:07:16 +08:00
|
|
|
right: 8px;
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2016-12-03 17:31:04 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
2015-12-31 17:34:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-vertical {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-vertical > & {
|
|
|
|
top: 0;
|
|
|
|
left: 100%;
|
|
|
|
position: absolute;
|
|
|
|
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 {
|
|
|
|
&,
|
|
|
|
&:after {
|
|
|
|
color: @disabled-color;
|
|
|
|
}
|
|
|
|
}
|
2015-12-31 17:34:04 +08:00
|
|
|
&-submenu:first-child &-submenu-title {
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu:last-child &-submenu-title {
|
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
|
|
|
}
|
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,
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{dropdown-prefix-cls}-link {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix}-down {
|
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;
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
&.@{ant-prefix}-btn-group > .@{ant-prefix}-btn:last-child:not(:first-child) {
|
2017-05-02 16:07:16 +08:00
|
|
|
padding-right: 8px;
|
2015-12-02 15:18:15 +08:00
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix}-down {
|
2016-12-03 17:31:04 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
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;
|
|
|
|
&:after {
|
|
|
|
color: @text-color-secondary-dark;
|
|
|
|
}
|
|
|
|
&:hover {
|
|
|
|
color: #fff;
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.@{dropdown-prefix-cls}-menu-item-selected {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
> a {
|
|
|
|
background: @primary-color;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|