ant-design/style/components/dropdown.less

167 lines
3.4 KiB
Plaintext
Raw Normal View History

2015-10-09 14:38:26 +08:00
@import "../mixins/index";
@dropdown-prefix-cls: ~"@{css-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;
font-size: 12px;
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
.@{btn-prefix-cls} > .@{iconfont-css-prefix}-down {
.iconfont-size-under-12px(10px);
}
2015-07-15 15:19:04 +08:00
.anticon-down:before {
2015-06-17 17:30:25 +08:00
transition: transform 0.2s ease;
}
}
&-wrap-open {
2015-07-15 15:19:04 +08:00
.anticon-down:before {
.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
&-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;
background-color: #fff;
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-02 11:53:37 +08:00
border: 1px solid @border-color-base;
2015-06-09 15:21:44 +08:00
&-item,
&-submenu-title {
padding: 7px 15px;
margin: 0;
2015-06-09 15:21:44 +08:00
clear: both;
font-size: 12px;
font-weight: normal;
2015-06-17 17:36:29 +08:00
color: #666;
2015-06-09 15:21:44 +08:00
white-space: nowrap;
2015-07-13 18:42:08 +08:00
cursor: pointer;
2015-09-23 11:21:36 +08:00
transition: background 0.3s ease;
2015-06-09 15:21:44 +08:00
> a {
2015-06-17 17:36:29 +08:00
color: #666;
display: block;
padding: 7px 15px;
margin: -7px -15px;
2015-06-17 17:36:29 +08:00
}
2015-06-09 15:21:44 +08:00
&:hover {
2015-07-08 15:18:28 +08:00
background-color: tint(@primary-color, 90%);
2015-06-09 15:21:44 +08:00
}
&-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: none;
&:hover {
color: #ccc;
background-color: #fff;
cursor: not-allowed;
}
}
&:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
2015-06-09 15:21:44 +08:00
}
&:last-child {
border-radius: 0 0 @border-radius-base @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;
}
}
&-submenu-title:after {
font-family: "anticon" !important;
position: absolute;
content: "\e600";
right: 15px;
color: #999;
.iconfont-size-under-12px(8px);
}
&-submenu-vertical {
position: relative;
}
&-submenu-vertical > & {
top: 0;
left: 100%;
position: absolute;
min-width: 100%;
margin-left: 4px;
transform-origin: 0 0;
}
&-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
&.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;
}
2015-06-17 17:30:25 +08:00
}
2015-07-12 13:15:05 +08:00
2015-08-20 16:55:42 +08:00
.@{dropdown-prefix-cls}-link {
2015-12-02 15:18:15 +08:00
font-size: 12px;
2015-07-12 13:15:05 +08:00
.anticon-down {
2015-12-02 15:18:15 +08:00
.iconfont-size-under-12px(8px);
2015-07-12 13:15:05 +08:00
font-weight: bold;
}
}
2015-12-02 15:18:15 +08:00
.@{dropdown-prefix-cls}-button {
&.ant-btn-group > .ant-btn:last-child:not(:first-child) {
2015-12-02 22:31:24 +08:00
padding-right: 7px;
2015-12-02 15:18:15 +08:00
}
.anticon-down {
.iconfont-size-under-12px(10px);
}
}