feat(style): add component css variables

This commit is contained in:
chenjiahan
2021-06-12 15:52:22 +08:00
committed by neverland
parent dafea4e1e8
commit fe1cba97b7
73 changed files with 1702 additions and 799 deletions
+20 -9
View File
@@ -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%);
}