drip-ui
Version:
Lightweight Mobile UI Components built on Vue
169 lines (143 loc) • 3.35 kB
CSS
@import './common/var.css';
.drip-button {
position: relative;
padding: 0;
display: inline-block;
height: 60px;
line-height: 58px;
border-radius: 30px;
box-sizing: border-box;
font-size: 26px;
text-align: center;
-webkit-appearance: none;
-webkit-text-size-adjust: 100%;
&::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;
}
&--blue {
color: $button-blue-color;
background-color: $button-blue-background-color;
border: 1px solid $button-blue-border-color;
}
&--orange {
color: $button-orange-color;
background-color: $button-orange-background-color;
border: 1px solid $button-orange-border-color;
}
&--green {
color: $button-green-color;
background-color: $button-green-background-color;
border: 1px solid $button-green-border-color;
}
/* &--primary {
color: $button-primary-color;
background-color: $button-primary-background-color;
border: 1px solid $button-primary-border-color;
}
&--primary {
color: $button-primary-color;
background-color: $button-primary-background-color;
border: 1px solid $button-primary-border-color;
} */
/* &--warning {
color: $button-warning-color;
background-color: $button-warning-background-color;
border: 1px solid $button-warning-border-color;
} */
&--plain {
background-color: $white;
&.drip-button--blue {
color: $button-blue-background-color;
}
&.drip-button--orange {
color: $button-orange-background-color;
}
&.drip-button--green {
color: $button-green-background-color;
}
}
&--large {
width: 100%;
max-width: 670px;
height: 100px;
line-height: 98px;
border-radius: 50px;
font-size: 36px;
}
&--normal {
min-width: 160px;
padding: 0 25px;
font-size: 28px;
}
&--small {
min-width: 140px;
height: 48px;
padding: 0 16px;
font-size: 24px;
line-height: 48px;
}
&--loading {
.drip-loading {
display: inline-block;
}
}
/* mini图标默认宽度50px,文字不能超过4个 */
/* &--mini {
display: inline-block;
width: 50px;
height: 44px;
line-height: 40px;
font-size: 20px;
& + .drip-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;
/* &.drip-button--primary {
background-color: $button-bottom-action-primary-background-color;
} */
}
&--disabled {
opacity: .5;
}
&--round {
border-radius: 10em;
}
&--square {
border-radius: 0;
}
}