151 lines
2.6 KiB
CSS

@import '../common/style/var.css';
@import '../common/style/hairline.css';
.van-steps {
overflow: hidden;
background-color: $white;
&--horizontal {
position: relative;
display: flex;
overflow: hidden;
padding: 10px 10px 15px;
}
&--vertical {
padding: 0 0 0 35px;
}
}
.van-step {
position: relative;
flex: 1;
font-size: 14px;
color: $gray-dark;
&--finish {
color: $text-color;
}
&__circle {
width: 5px;
height: 5px;
background-color: #999;
border-radius: 50%;
}
&--horizontal {
padding-bottom: 14px;
&:first-child {
.van-step__title {
transform: none;
}
.van-step__circle-container {
padding: 0 8px 0 0;
transform: translate3d(0, 50%, 0);
}
}
&:last-child {
position: absolute;
right: 10px;
width: auto;
.van-step__title {
transform: none;
text-align: right;
}
.van-step__circle-container {
right: 0;
padding: 0 0 0 8px;
transform: translate3d(0, 50%, 0);
}
}
.van-step__circle-container {
position: absolute;
bottom: 6px;
z-index: 1;
padding: 0 8px;
background-color: $white;
transform: translate3d(-50%, 50%, 0);
}
.van-step__title {
display: inline-block;
font-size: 12px;
transform: translate3d(-50%, 0, 0);
}
.van-step__line {
position: absolute;
left: 0;
right: 0;
bottom: 6px;
height: 1px;
background-color: $border-color;
transform: translate3d(0, 50%, 0);
}
&.van-step--process {
color: $text-color;
.van-step__active {
display: block;
font-size: 12px;
color: $green;
line-height: 1;
}
}
}
&--vertical {
font-size: 14px;
line-height: 18px;
padding: 10px 10px 10px 0;
&:not(:last-child)::after {
border-bottom-width: 1px;
}
&:first-child {
&::before {
content: '';
position: absolute;
width: 1px;
height: 20px;
background-color: $white;
top: 0;
left: -15px;
z-index: 1;
}
}
.van-step__active,
.van-step__circle,
.van-step__line {
position: absolute;
top: 19px;
left: -14px;
z-index: 2;
transform: translate3d(-50%, -50%, 0);
}
.van-step__active {
font-size: 12px;
line-height: 1;
}
.van-step__line {
z-index: 1;
width: 1px;
height: 100%;
background-color: $border-color;
transform: translate3d(-50%, 0, 0);
}
}
}