vant/src/popup/index.less
2019-07-09 10:45:10 +08:00

87 lines
1.7 KiB
Plaintext

@import '../style/var';
.van {
&-overflow-hidden {
overflow: hidden !important;
}
&-popup {
position: fixed;
max-height: 100%;
overflow-y: auto;
background-color: @popup-background-color;
transition: @popup-transition;
-webkit-overflow-scrolling: touch;
&--center {
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
&.van-popup--round {
border-radius: @popup-round-border-radius;
}
}
&--top {
top: 0;
left: 0;
width: 100%;
&.van-popup--round {
border-radius: 0 0 @popup-round-border-radius @popup-round-border-radius;
}
}
&--right {
top: 50%;
right: 0;
transform: translate3d(0, -50%, 0);
&.van-popup--round {
border-radius: @popup-round-border-radius 0 0 @popup-round-border-radius;
}
}
&--bottom {
bottom: 0;
left: 0;
width: 100%;
&.van-popup--round {
border-radius: @popup-round-border-radius @popup-round-border-radius 0 0;
}
}
&--left {
top: 50%;
left: 0;
transform: translate3d(0, -50%, 0);
&.van-popup--round {
border-radius: 0 @popup-round-border-radius @popup-round-border-radius 0;
}
}
&-slide-top-enter,
&-slide-top-leave-active {
transform: translate3d(0, -100%, 0);
}
&-slide-right-enter,
&-slide-right-leave-active {
transform: translate3d(100%, -50%, 0);
}
&-slide-bottom-enter,
&-slide-bottom-leave-active {
transform: translate3d(0, 100%, 0);
}
&-slide-left-enter,
&-slide-left-leave-active {
transform: translate3d(-100%, -50%, 0);
}
}
}