weui-dialog.wxss 3.0 KB
Newer Older
X
xushengni 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
/**
* Tencent is pleased to support the open source community by making
* WeUI-WXSS 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.wxss";

.weui-dialog__wrp {
  position: fixed;
  z-index: 5000;
  top: 16px;
  bottom: 16px;
  left: 16px;
  right: 16px;
  text-align:center;
  font-size:0;
  display:-webkit-box;
  display:-webkit-flex;
  display:flex;
  align-items:center;
  -webkit-box-pack:center;
  -webkit-justify-content:center;
  justify-content:center;
  .weui-dialog {
    max-height:100%;
  }
}
.weui-dialog {
    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 {
    flex:1;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding: 0 @weuiDialogGapWidth;
    margin-bottom:32px;
    min-height: 40px;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap:break-word;
    -webkit-hyphens:auto;
    hyphens:auto;
    color: @weuiTextColorDesc;
    &:first-child{
        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;
    line-height: 64px;
    min-height: 64px;
    font-size: 17px;
    display: flex;
    &:after {
        content: " ";
        .setTopLine(@weuiDialogLineColor);
    }
}
.weui-dialog__btn {
    display: block;
    flex: 1;
    color: @weuiDialogLinkColor;
    font-weight:700;
    text-decoration: none;
    .setTapColor();
    &:active {
        background-color: @weuiDialogLinkActiveBc;
    }

    position: relative;
    &:after {
        content: " ";
        .setLeftLine(@weuiDialogLineColor);
    }
    &:first-child {
        &:after {
            display: none;
        }
    }
}
.weui-dialog__btn_default {
    color: @weuiTextColorTitle;
}

@media screen and (min-width: 352px) {
    .weui-dialog {
        width: 320px;
        margin:0 auto;
    }
}