weui
Version:
A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.
160 lines (152 loc) • 3.79 kB
text/less
/*
* Tencent is pleased to support the open source community by making WeUI available.
*
* Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
@import "../../base/fn";
.weui-dialog {
position: fixed;
z-index: 5000;
top: 50%;
left: 16px;
right: 16px;
transform: translate(0, -50%);
background-color: @weuiDialogBackgroundColor;
text-align: center;
border-radius: 12px;
overflow: hidden;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
max-height: 90%;
}
.weui-dialog__hd {
padding: 32px @weuiDialogGapWidth 16px;
}
.weui-dialog__title {
font-weight: 700;
font-size: 17px;
line-height: 1.4;
}
.weui-dialog__bd {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 0 @weuiDialogGapWidth;
margin-bottom: 32px;
font-size: 17px;
line-height: 1.4;
.hyphens;
color: @weuiTextColorDesc;
&:first-child {
min-height: 40px;
padding: 32px @weuiDialogGapWidth 0;
font-weight: 700;
color: @weuiTextColorTitle;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
}
.weui-dialog__ft {
position: relative;
display: flex;
&:after {
content: " ";
.setTopLine(@weuiDialogLineColor);
}
}
.weui-dialog__btn {
flex: 1;
display: block;
line-height: (56-32)/17;
padding:16px 0;
font-size: 17px;
color: @weuiDialogLinkColor;
font-weight: 700;
text-decoration: none;
.setTapColor();
&:active {
background-color: @weuiDialogLinkActiveBc;
}
position: relative;
overflow:hidden;//兼容小程序旁白点击无效
&:after {
content: " ";
.setLeftLine(@weuiDialogLineColor);
}
&:first-child {
&:after {
display: none;
}
}
}
.weui-dialog__btn_default {
color: var(--weui-FG-HALF);
}
.weui-skin_android {
.weui-dialog {
text-align: left;
box-shadow: 0 6px 30px 0 rgba(0, 0, 0, 0.1);
}
.weui-dialog__title {
font-size: 22px;
line-height: 1.4;
}
.weui-dialog__hd {
text-align: left;
}
.weui-dialog__bd {
color: @weuiTextColorDesc;
text-align: left;
&:first-child {
color: @weuiTextColorTitle;
}
}
.weui-dialog__ft {
display: block;
text-align: right;
line-height: 40px;
min-height: 40px;
padding: 0 @weuiDialogGapWidth 16px;
&:after {
display: none;
}
}
.weui-dialog__btn {
display: inline-block;
vertical-align: top;
padding: 0 0.8em;
&:after {
display: none;
}
&:last-child {
margin-right: -0.8em;
}
}
.weui-dialog__btn_default {
color: var(--weui-FG-HALF);
}
}
@media screen and (min-width: 352px) {
.weui-dialog {
width: 320px;
margin: 0 auto;
}
}