mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -90,7 +90,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="postcss">
|
||||
<style lang="less">
|
||||
.demo-popup {
|
||||
.van-button {
|
||||
margin: 10px 0 10px 15px;
|
||||
|
||||
82
packages/popup/index.less
Normal file
82
packages/popup/index.less
Normal file
@@ -0,0 +1,82 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van {
|
||||
&-modal {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
&-overflow-hidden {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
&-popup {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: @white;
|
||||
transition: .3s ease-out;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
|
||||
&--top {
|
||||
width: 100%;
|
||||
top: 0;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
}
|
||||
|
||||
&--right {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
transform: translate3d(0, -50%, 0);
|
||||
}
|
||||
|
||||
&--bottom {
|
||||
width: 100%;
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
right: auto;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
}
|
||||
|
||||
&--left {
|
||||
top: 50%;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
left: 0;
|
||||
transform: translate3d(0, -50%, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-slide-top-enter,
|
||||
.popup-slide-top-leave-active {
|
||||
transform: translate3d(-50%, -100%, 0);
|
||||
}
|
||||
|
||||
.popup-slide-right-enter,
|
||||
.popup-slide-right-leave-active {
|
||||
transform: translate3d(100%, -50%, 0);
|
||||
}
|
||||
|
||||
.popup-slide-bottom-enter,
|
||||
.popup-slide-bottom-leave-active {
|
||||
transform: translate3d(-50%, 100%, 0);
|
||||
}
|
||||
|
||||
.popup-slide-left-enter,
|
||||
.popup-slide-left-leave-active {
|
||||
transform: translate3d(-100%, -50%, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user