weui
Version:
A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.
185 lines (177 loc) • 5.56 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-half-screen-dialog {
position: fixed;
left: 0;
right: 0;
bottom: 0;
max-height: 75%;
z-index: 5000;
line-height: 1.4;
background-color: var(--weui-BG-2);
border-top-left-radius: 12px;
border-top-right-radius: 12px;
overflow: hidden;
padding: 0 24px;
padding: 0 calc(24px ~"+ constant(safe-area-inset-right)") constant(safe-area-inset-bottom) calc(24px ~"+ constant(safe-area-inset-left)");
padding: 0 calc(24px ~"+ env(safe-area-inset-right)") env(safe-area-inset-bottom) calc(24px ~"+ env(safe-area-inset-left)");
display:flex;
flex-direction:column;
@media only screen and (max-height: 558px) {
max-height: none;
}
}
.weui-half-screen-dialog__hd {
font-size: 8px;
height: 8em;
display: flex;
align-items: center;
flex-shrink:0;
.weui-icon-btn {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
&:active { opacity: 0.5; }
}
}
.weui-half-screen-dialog__hd__side {
position: relative;
left: -8px;
}
.weui-half-screen-dialog__hd__main {
flex: 1;
.weui-half-screen-dialog__hd__side + & {
text-align: center;
padding: 0 40px;
}
& + .weui-half-screen-dialog__hd__side {
right: -8px;
left: auto;
.weui-icon-btn {
right: 0;
}
}
}
.weui-half-screen-dialog__title {
display: block;
color: var(--weui-FG-0);
font-weight: 700;
font-size: 15px;
}
.weui-half-screen-dialog__subtitle {
display: block;
color: var(--weui-FG-1);
font-size: 10px;
}
.weui-half-screen-dialog__bd {
flex:1;
min-height:0;
overflow-y: auto;
display:flex;
flex-direction:column;
.hyphens();
padding-top: 4px;
padding-bottom: 56px;
font-size: 14px;
color: var(--weui-FG-0);
}
.weui-half-screen-dialog__desc {
font-size: 17px;
font-weight: 700;
color: var(--weui-FG-0);
line-height: 1.4;
}
.weui-half-screen-dialog__tips {
padding-top: 16px;
font-size: 14px;
color: var(--weui-FG-2);
line-height: 1.4;
}
.weui-half-screen-dialog__ft {
padding: 0 0 64px;
text-align: center;
.weui-btn{
width: @weuiBtnWidth;
padding-left:16px;
padding-right:16px;
}
.weui-btn:nth-last-child(n+2),
.weui-btn:nth-last-child(n+2) + .weui-btn {
margin: 0 8px;
width: 136px;
&:first-child{
margin-left:0;
}
&:last-child{
margin-right:0;
}
}
}
.weui-half-screen-dialog__btn-area{
display: flex;
align-items: center;
justify-content: center;
&+.weui-half-screen-dialog__attachment-area{
margin-top:24px;
margin-bottom:-34px;
}
}
.weui-icon-btn {
outline: 0;
-webkit-appearance: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
border-width: 0;
background-color: transparent;
color: var(--weui-FG-0);
font-size: 0;
width:auto;
height:auto;
}
.weui-icon-more {
display: inline-block;
vertical-align: middle;
width: 24px;
height: 24px;
mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M5 10.25a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5zm7 0a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5zm7 0a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5z'/%3E%3C/svg%3E") no-repeat 50% 50%;
-webkit-mask-size: cover;
mask-size: cover;
background-color: currentColor;
color: @weuiTextColorTitle;
}
.weui-icon-btn_goback {
color: @weuiTextColorTitle;
display: inline-block;
vertical-align: middle;
width: 12px;
height: 24px;
mask: url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.438L8.955%2020.5l-7.666-7.79a1.02%201.02%200%20010-1.42L8.955%203.5%2010%204.563%202.682%2012%2010%2019.438z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") no-repeat 50% 50%;
-webkit-mask-size: cover;
mask-size: cover;
background-color: currentColor;
}
.weui-icon-btn_close {
color: @weuiTextColorTitle;
display: inline-block;
vertical-align: middle;
width: 14px;
height: 24px;
mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.25%2010.693L6.057%204.5%205%205.557l6.193%206.193L5%2017.943%206.057%2019l6.193-6.193L18.443%2019l1.057-1.057-6.193-6.193L19.5%205.557%2018.443%204.5z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") no-repeat 50% 50%;
-webkit-mask-size: cover;
mask-size: cover;
background-color: currentColor;
}