vant/packages/step/index.less

142 lines
2.3 KiB
Plaintext

@import '../style/var';
.van-step {
position: relative;
flex: 1;
color: @gray-dark;
font-size: 14px;
&__circle {
display: block;
width: 5px;
height: 5px;
background-color: @gray-dark;
border-radius: 50%;
}
&--horizontal {
float: left;
&:first-child {
.van-step__title {
margin-left: 0;
transform: none;
}
}
&:last-child {
position: absolute;
right: 1px;
width: auto;
.van-step__title {
margin-left: 0;
transform: none;
}
.van-step__circle-container {
right: -9px;
left: auto;
}
}
.van-step__circle-container {
position: absolute;
top: 30px;
left: -8px;
z-index: 1;
padding: 0 8px;
background-color: @white;
transform: translateY(-50%);
}
.van-step__title {
display: inline-block;
margin-left: 3px;
font-size: 12px;
transform: translateX(-50%);
@media (max-width: 321px) {
font-size: 11px;
}
}
.van-step__line {
position: absolute;
top: 30px;
left: 0;
width: 100%;
height: 1px;
background-color: @border-color;
}
.van-step__icon {
display: block;
font-size: 12px;
}
.van-step--process {
color: @text-color;
}
}
&--vertical {
display: block;
float: none;
padding: 10px 10px 10px 0;
font-size: 14px;
line-height: 18px;
&:not(:last-child)::after {
border-bottom-width: 1px;
}
&:first-child {
&::before {
position: absolute;
top: 0;
left: -15px;
z-index: 1;
width: 1px;
height: 20px;
background-color: @white;
content: '';
}
}
.van-step__circle-container {
position: absolute;
top: 19px;
left: -15px;
z-index: 2;
font-size: 12px;
line-height: 1;
transform: translate(-50%, -50%);
}
.van-step__line {
position: absolute;
top: 16px;
left: -15px;
width: 1px;
height: 100%;
background-color: @border-color;
}
}
&:last-child {
.van-step__line {
width: 0;
}
}
&--finish {
color: @text-color;
.van-step__circle,
.van-step__line {
background-color: @green;
}
}
}