Fix dark theme menu style of Dropdown, close #4903

This commit is contained in:
afc163 2017-02-18 15:24:25 +08:00
parent bd6bc70302
commit ddcc284b43

View File

@ -58,13 +58,14 @@
color: @text-color; color: @text-color;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
transition: background 0.3s ease; transition: all .3s;
> a { > a {
color: @text-color; color: @text-color;
display: block; display: block;
padding: 7px 16px; padding: 7px 16px;
margin: -7px -16px; margin: -7px -16px;
transition: all .3s;
} }
&:hover { &:hover {
@ -83,15 +84,18 @@
} }
} }
&:first-child { &:first-child,
&:first-child > a {
border-radius: @border-radius-base @border-radius-base 0 0; border-radius: @border-radius-base @border-radius-base 0 0;
} }
&:last-child { &:last-child,
&:last-child > a {
border-radius: 0 0 @border-radius-base @border-radius-base; border-radius: 0 0 @border-radius-base @border-radius-base;
} }
&:only-child { &:only-child,
&:only-child > a {
border-radius: @border-radius-base; border-radius: @border-radius-base;
} }
@ -182,3 +186,31 @@
.iconfont-size-under-12px(10px); .iconfont-size-under-12px(10px);
} }
} }
// 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;
}
}
}