ant-design/style/components/dropdown.less

151 lines
2.8 KiB
Plaintext
Raw Normal View History

2015-06-12 12:01:02 +08:00
@dropdownPrefixCls: ant-dropdown;
2015-06-09 15:21:44 +08:00
.@{dropdownPrefixCls} {
position: absolute;
left: -9999px;
top: -9999px;
z-index: 1070;
display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 1.5;
padding-top: 7px;
2015-06-15 20:36:49 +08:00
min-width: 100%;
&-wrap {
position: relative;
}
2015-06-09 15:21:44 +08:00
2015-06-15 21:18:08 +08:00
&-hidden {
display: none;
}
2015-06-09 15:21:44 +08:00
&-menu {
outline: none;
position: relative;
list-style-type: none;
padding: 0;
margin: 2px 0 0 0;
text-align: left;
background-color: #fff;
border-radius: 3px;
box-shadow: 0 1px 5px #ccc;
background-clip: padding-box;
border: 1px solid #ccc;
> li {
margin: 0;
padding: 0;
}
&:before {
content: "";
position: absolute;
top: -4px;
left: 0;
width: 100%;
height: 4px;
background: rgb(255, 255, 255);
background: rgba(255, 255, 255, 0.01);
}
& > &-item {
padding: 7px 10px;
clear: both;
font-size: 12px;
font-weight: normal;
color: #666666;
white-space: nowrap;
&:hover {
background-color: #ebfaff;
}
&-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: none;
&:hover {
color: #ccc;
background-color: #fff;
cursor: not-allowed;
}
}
&:last-child {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
&:first-child {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
&-divider {
height: 1px;
margin: 1px 0;
overflow: hidden;
background-color: #e5e5e5;
line-height: 0;
}
}
}
.effect() {
animation-duration: 0.3s;
animation-fill-mode: both;
transform-origin: 0 0;
}
&-slide-up-enter {
.effect();
opacity: 0;
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
animation-play-state: paused;
}
&-slide-up-leave {
.effect();
opacity: 1;
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
animation-play-state: paused;
}
&-slide-up-enter&-slide-up-enter-active {
animation-name: rcDropdownSlideUpIn;
animation-play-state: running;
}
&-slide-up-leave&-slide-up-leave-active {
animation-name: rcDropdownSlideUpOut;
animation-play-state: running;
}
@keyframes rcDropdownSlideUpIn {
0% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(0);
}
100% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
}
@keyframes rcDropdownSlideUpOut {
0% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
100% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(0);
}
}
}