ifui
Version:
136 lines (114 loc) • 2.59 kB
CSS
@import './common/var.css';
.ifu-button {
position: relative;
padding: 0;
display: inline-block;
height: 90px;
line-height: 86px;
border-radius: 6px;
box-sizing: border-box;
font-size: 32px;
text-align: center;
-webkit-appearance: none;
&::before {
content: " ";
position: absolute;
top: 50%;
left: 50%;
opacity: 0;
width: 100%;
height: 100%;
border: inherit;
border-color: $black;
background-color: $black;
border-radius: inherit; /* inherit parent's border radius */
transform: translate(-50%, -50%);
}
&:active::before {
opacity: .3;
}
&--unclickable::before {
display: none;
}
&--default {
color: $button-default-color;
background-color: $button-default-background-color;
border: 1px solid $button-default-border-color;
}
&--primary {
color: $button-primary-color;
background-color: $button-primary-background-color;
border: 1px solid $button-primary-border-color;
}
&--danger {
color: $button-danger-color;
background-color: $button-danger-background-color;
border: 1px solid $button-danger-border-color;
}
&--plain {
background-color: $white;
&.van-button--primary {
color: $button-primary-background-color;
}
&.van-button--danger {
color: $button-danger-background-color;
}
}
&--large {
width: 100%;
height: 100px;
line-height: 92px;
}
&--normal {
padding: 0 30px;
font-size: 28px;
}
&--small {
height: 60px;
padding: 0 16px;
min-width: 120px;
font-size: 24px;
line-height: 36px;
}
&--loading {
.van-loading {
display: inline-block;
}
.van-button__text {
display: none;
}
}
/* mini图标默认宽度50px,文字不能超过4个 */
&--mini {
display: inline-block;
width: 100px;
height: 44px;
line-height: 40px;
font-size: 20px;
& + .van-button--mini {
margin-left: 10px;
}
}
&--block {
width: 100%;
display: block;
}
&--bottom-action {
width: 100%;
height: 100px;
line-height: 100px;
border: 0;
border-radius: 0;
font-size: 32px;
color: $button-bottom-action-default-color;
background-color: $button-bottom-action-default-background-color;
&.van-button--primary {
background-color: $button-bottom-action-primary-background-color;
}
}
&--disabled {
color: $button-disabled-color;
background-color: $button-disabled-background-color;
border: 1px solid $button-disabled-border-color;
}
}