diff --git a/packages/common/style/var.less b/packages/common/style/var.less index f2a13647..7227a4d9 100644 --- a/packages/common/style/var.less +++ b/packages/common/style/var.less @@ -227,6 +227,17 @@ // NavBar @nav-bar-height: 44px; +// NoticeBar +@notice-bar-height: 40px; +@notice-bar-padding: 0 @padding-md; +@notice-bar-wrapable-padding: @padding-xs @padding-md; +@notice-bar-font-size: @font-size-md; +@notice-bar-text-color: @orange-dark; +@notice-bar-line-height: 24px; +@notice-bar-background-color: @orange-light; +@notice-bar-icon-size: 16px; +@notice-bar-icon-min-width: 22px; + // Notify @notify-padding: 6px 15px; @notify-font-size: 14px; diff --git a/packages/notice-bar/index.less b/packages/notice-bar/index.less index e350b089..990de481 100644 --- a/packages/notice-bar/index.less +++ b/packages/notice-bar/index.less @@ -1,10 +1,15 @@ +@import '../common/style/var.less'; +@import '../common/style/theme.less'; + .van-notice-bar { display: flex; align-items: center; - height: 40px; - padding: 0 15px; - font-size: 14px; - line-height: 24px; + .theme(height, '@notice-bar-height'); + .theme(padding, '@notice-bar-padding'); + .theme(font-size, '@notice-bar-font-size'); + .theme(color, '@notice-bar-text-color'); + .theme(line-height, '@notice-bar-line-height'); + .theme(background-color, '@notice-bar-background-color'); &--withicon { position: relative; @@ -13,7 +18,7 @@ &--wrapable { height: auto; - padding: 8px 15px; + .theme(padding, '@notice-bar-wrapable-padding'); .van-notice-bar { &__wrap { @@ -32,20 +37,23 @@ align-items: center; margin-right: 4px; vertical-align: middle; + .theme(font-size, '@notice-bar-icon-size'); + .theme(min-width, '@notice-bar-icon-min-width'); } &__right-icon { position: absolute; top: 10px; right: 15px; - font-size: 16px; + .theme(font-size, '@notice-bar-icon-size'); + .theme(min-width, '@notice-bar-icon-min-width'); } &__wrap { position: relative; flex: 1; - height: 24px; overflow: hidden; + .theme(height, '@notice-bar-line-height'); } &__content {