feat(style): add component css variables
This commit is contained in:
+20
-9
@@ -1,16 +1,27 @@
|
||||
@import './var.less';
|
||||
|
||||
:root {
|
||||
--van-progress-height: @progress-height;
|
||||
--van-progress-color: @progress-color;
|
||||
--van-progress-background-color: @progress-background-color;
|
||||
--van-progress-pivot-padding: @progress-pivot-padding;
|
||||
--van-progress-pivot-text-color: @progress-pivot-text-color;
|
||||
--van-progress-pivot-font-size: @progress-pivot-font-size;
|
||||
--van-progress-pivot-line-height: @progress-pivot-line-height;
|
||||
--van-progress-pivot-background-color: @progress-pivot-background-color;
|
||||
}
|
||||
|
||||
.van-progress {
|
||||
position: relative;
|
||||
height: @progress-height;
|
||||
background: @progress-background-color;
|
||||
border-radius: @progress-height;
|
||||
height: var(--van-progress-height);
|
||||
background: var(--van-progress-background-color);
|
||||
border-radius: var(--van-progress-height);
|
||||
|
||||
&__portion {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
background: @progress-color;
|
||||
background: var(--van-progress-color);
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
@@ -19,13 +30,13 @@
|
||||
top: 50%;
|
||||
box-sizing: border-box;
|
||||
min-width: 3.6em;
|
||||
padding: @progress-pivot-padding;
|
||||
color: @progress-pivot-text-color;
|
||||
font-size: @progress-pivot-font-size;
|
||||
line-height: @progress-pivot-line-height;
|
||||
padding: var(--van-progress-pivot-padding);
|
||||
color: var(--van-progress-pivot-text-color);
|
||||
font-size: var(--van-progress-pivot-font-size);
|
||||
line-height: var(--van-progress-pivot-line-height);
|
||||
text-align: center;
|
||||
word-break: keep-all;
|
||||
background-color: @progress-pivot-background-color;
|
||||
background-color: var(--van-progress-pivot-background-color);
|
||||
border-radius: 1em;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user