feat(style): add component css variables
This commit is contained in:
@@ -1,20 +1,32 @@
|
||||
@import './var.less';
|
||||
|
||||
:root {
|
||||
--van-notice-bar-height: @notice-bar-height;
|
||||
--van-notice-bar-padding: @notice-bar-padding;
|
||||
--van-notice-bar-wrapable-padding: @notice-bar-wrapable-padding;
|
||||
--van-notice-bar-text-color: @notice-bar-text-color;
|
||||
--van-notice-bar-font-size: @notice-bar-font-size;
|
||||
--van-notice-bar-line-height: @notice-bar-line-height;
|
||||
--van-notice-bar-background-color: @notice-bar-background-color;
|
||||
--van-notice-bar-icon-size: @notice-bar-icon-size;
|
||||
--van-notice-bar-icon-min-width: @notice-bar-icon-min-width;
|
||||
}
|
||||
|
||||
.van-notice-bar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: @notice-bar-height;
|
||||
padding: @notice-bar-padding;
|
||||
color: @notice-bar-text-color;
|
||||
font-size: @notice-bar-font-size;
|
||||
line-height: @notice-bar-line-height;
|
||||
background-color: @notice-bar-background-color;
|
||||
height: var(--van-notice-bar-height);
|
||||
padding: var(--van-notice-bar-padding);
|
||||
color: var(--van-notice-bar-text-color);
|
||||
font-size: var(--van-notice-bar-font-size);
|
||||
line-height: var(--van-notice-bar-line-height);
|
||||
background-color: var(--van-notice-bar-background-color);
|
||||
|
||||
&__left-icon,
|
||||
&__right-icon {
|
||||
min-width: @notice-bar-icon-min-width;
|
||||
font-size: @notice-bar-icon-size;
|
||||
min-width: var(--van-notice-bar-icon-min-width);
|
||||
font-size: var(--van-notice-bar-icon-size);
|
||||
}
|
||||
|
||||
&__right-icon {
|
||||
@@ -43,7 +55,7 @@
|
||||
|
||||
&--wrapable {
|
||||
height: auto;
|
||||
padding: @notice-bar-wrapable-padding;
|
||||
padding: var(--van-notice-bar-wrapable-padding);
|
||||
|
||||
.van-notice-bar {
|
||||
&__wrap {
|
||||
|
||||
Reference in New Issue
Block a user