Files
vant/packages/zanui-css/src/button.css
T
2017-03-06 21:49:41 +08:00

112 lines
2.1 KiB
CSS

@import './common/var.css';
@import './loading.css';
@component-namespace zan {
@b button {
position: relative;
padding: 0;
display: inline-block;
height: 45px;
line-height: 43px;
border-radius: 4px;
border: 0;
box-sizing: border-box;
font-size: 16px;
text-align: center;
appearance: none;
outline: 0;
overflow: hidden;
&::after {
content: " ";
position: absolute 0 0 0 0;
background-color: #000;
opacity: 0;
}
&:not(.is-disabled):active::after {
opacity: .3;
}
& + .zan-button {
margin-left: 10px;
}
@m default {
color: $button-default-color;
background-color: $button-default-background-color;
border: 1px solid $button-default-border-color;
}
@m primary {
color: $button-primary-color;
background-color: $button-primary-background-color;
border: 1px solid $button-primary-border-color;
}
@m danger {
color: $button-danger-color;
background-color: $button-danger-background-color;
border: 1px solid $button-danger-border-color;
}
@m large {
width: 100%;
height: 50px;
line-height: 48px;
font-size: 16px;
}
@m normal {
padding: 0 10px;
font-size: 14px;
}
@m small {
min-width: 60px;
height: 30px;
line-height: 28px;
font-size: 12px;
}
/*
mini图标默认宽度50px,文字不能超过4个
*/
@m mini {
display: inline-block;
width: 50px;
height: 22px;
line-height: 20px;
font-size: 10px;
& + .zan-button--mini {
margin-left: 5px;
}
}
@m disabled {
color: $button-disabled-color;
background-color: $button-disabled-background-color;
border: 1px solid $button-disabled-border-color;
}
@m block {
display: block;
width: 100%;
}
@m loading {
.zan-button__text {
display: none;
}
}
@e icon-loading {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
}
}