UNPKG

wux-weapp

Version:

一套组件化、可复用、易扩展的微信小程序 UI 组件库

147 lines (127 loc) 3.18 kB
@import "../styles/mixins/index.less"; @import "../styles/themes/index.less"; .@{wux-prefix}-popup { position: fixed; z-index: @z-index-popup; width: @popup-width; max-width: @popup-max-width; &__content { position: relative; background-color: @popup-content-bg; border: 0; background-clip: padding-box; height: 100%; text-align: center; overflow: hidden; } &__title { font-weight: 400; font-size: @popup-title-font-size; color: @heading-color; } &__bd { min-height: 40px; font-size: @popup-bd-font-size; line-height: 1.3; word-wrap: break-word; word-break: break-all; color: @text-color-secondary; } &__ft { position: relative; line-height: 48px; font-size: @popup-title-font-size; display: flex; } &__close { border: 0; padding: 3px; background-color: transparent; outline: none; position: absolute; top: 6px; right: 6px; height: 21px; width: 21px; display: flex; justify-content: center; align-items: center; cursor: pointer; } &__close-x { cursor: pointer; display: inline-block; width: 15px; height: 15px; background-repeat: no-repeat; background-size: cover; .encoded-svg-background(delete); } &-position&-position--center { .@{wux-prefix}-popup { top: 50%; left: 50%; transform: translate(-50%, -50%); } .@{wux-prefix}-popup__content { border-radius: @border-radius-base; } .@{wux-prefix}-popup__hd { padding: @popup-hd-padding; } .@{wux-prefix}-popup__bd { padding: @popup-bd-padding; } .@{wux-prefix}-popup__ft::after { .setTopLine(@border-color-split); } } &-position&-position--top { .@{wux-prefix}-popup { position: fixed; left: 0; top: 0; width: 100%; max-width: 100%; &__close { top: unset; bottom: 6px; } } } &-position&-position--right { .@{wux-prefix}-popup { position: fixed; top: 0; right: 0; width: @popup-width; max-width: 100%; height: 100%; max-height: 100%; &__close { right: unset; left: 6px; } } } &-position&-position--bottom { .@{wux-prefix}-popup { position: fixed; left: 0; bottom: 0; width: 100%; max-width: 100%; } } &-position&-position--left { .@{wux-prefix}-popup { position: fixed; left: 0; top: 0; width: @popup-width; max-width: 100%; height: 100%; max-height: 100%; } } }