From 557b8ea54d83019cd4b1f52c104b059c706cf169 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 26 Sep 2019 20:39:59 +0800 Subject: [PATCH] chore: add @font-weight-bold var (#4594) --- src/action-sheet/index.less | 2 +- src/address-list/index.less | 2 +- src/card/index.less | 4 ++-- src/contact-list/index.less | 2 +- src/coupon-list/index.less | 2 +- src/coupon/index.less | 2 +- src/goods-action-button/index.less | 2 +- src/index-bar/index.less | 2 +- src/nav-bar/index.less | 2 +- src/picker/index.less | 2 +- src/sku/index.less | 4 ++-- src/style/var.less | 15 ++++++++++----- src/submit-bar/index.less | 2 +- src/tabs/index.less | 2 +- src/uploader/index.less | 4 ++-- 15 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/action-sheet/index.less b/src/action-sheet/index.less index f09b84e93..fa54f69f0 100644 --- a/src/action-sheet/index.less +++ b/src/action-sheet/index.less @@ -45,7 +45,7 @@ } &__header { - font-weight: 500; + font-weight: @font-weight-bold; font-size: @action-sheet-header-font-size; line-height: @action-sheet-header-height; text-align: center; diff --git a/src/address-list/index.less b/src/address-list/index.less index ccc225788..72a863066 100644 --- a/src/address-list/index.less +++ b/src/address-list/index.less @@ -29,7 +29,7 @@ &__name { margin-bottom: 5px; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @font-size-md; line-height: 20px; } diff --git a/src/card/index.less b/src/card/index.less index a634e8ba4..ed7754cf3 100644 --- a/src/card/index.less +++ b/src/card/index.less @@ -45,7 +45,7 @@ &__title { max-height: 32px; - font-weight: 500; + font-weight: @font-weight-bold; line-height: @card-title-line-height; .multi-ellipsis(2); @@ -64,7 +64,7 @@ &__price { display: inline-block; color: @card-price-color; - font-weight: 500; + font-weight: @font-weight-bold; } &__origin-price { diff --git a/src/contact-list/index.less b/src/contact-list/index.less index 6e90c270d..887df3b75 100644 --- a/src/contact-list/index.less +++ b/src/contact-list/index.less @@ -21,7 +21,7 @@ } &__name { - font-weight: 500; + font-weight: @font-weight-bold; font-size: @font-size-md; line-height: 20px; } diff --git a/src/coupon-list/index.less b/src/coupon-list/index.less index e41eff7e4..9adafee7b 100644 --- a/src/coupon-list/index.less +++ b/src/coupon-list/index.less @@ -25,7 +25,7 @@ position: absolute; bottom: 0; left: 0; - font-weight: 500; + font-weight: @font-weight-bold; } &__empty { diff --git a/src/coupon/index.less b/src/coupon/index.less index df53c249f..620a748a3 100644 --- a/src/coupon/index.less +++ b/src/coupon/index.less @@ -28,7 +28,7 @@ h2 { height: 34px; - font-weight: 500; + font-weight: @font-weight-bold; line-height: 34px; } diff --git a/src/goods-action-button/index.less b/src/goods-action-button/index.less index 30b1c0911..fa7f99178 100644 --- a/src/goods-action-button/index.less +++ b/src/goods-action-button/index.less @@ -3,7 +3,7 @@ .van-goods-action-button { flex: 1; height: @goods-action-button-height; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @font-size-md; line-height: normal; border: none; diff --git a/src/index-bar/index.less b/src/index-bar/index.less index 25e8f93cb..be711d7b0 100644 --- a/src/index-bar/index.less +++ b/src/index-bar/index.less @@ -14,7 +14,7 @@ &__index { padding: 0 @padding-base 0 @padding-md; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @index-bar-index-font-size; line-height: @index-bar-index-line-height; } diff --git a/src/nav-bar/index.less b/src/nav-bar/index.less index 6291ea490..f105af04b 100644 --- a/src/nav-bar/index.less +++ b/src/nav-bar/index.less @@ -34,7 +34,7 @@ max-width: 60%; margin: 0 auto; color: @nav-bar-title-text-color; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @nav-bar-title-font-size; } diff --git a/src/picker/index.less b/src/picker/index.less index 229e54250..a2463f858 100644 --- a/src/picker/index.less +++ b/src/picker/index.less @@ -28,7 +28,7 @@ &__title { max-width: 50%; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @picker-title-font-size; text-align: center; } diff --git a/src/sku/index.less b/src/sku/index.less index 1a1e33f0e..5faf0b682 100644 --- a/src/sku/index.less +++ b/src/sku/index.less @@ -72,7 +72,7 @@ } &__price-num { - font-weight: 500; + font-weight: @font-weight-bold; font-size: 22px; vertical-align: middle; word-wrap: break-word; @@ -316,7 +316,7 @@ .van-button { height: 40px; - font-weight: 500; + font-weight: @font-weight-bold; font-size: @font-size-md; line-height: 34px; border: none; diff --git a/src/style/var.less b/src/style/var.less index d46ac0b8d..066021f7a 100644 --- a/src/style/var.less +++ b/src/style/var.less @@ -33,6 +33,9 @@ @font-size-md: 14px; @font-size-lg: 16px; +// Font Weight +@font-weight-bold: 500; + // Animation @animation-duration-base: .3s; @animation-duration-fast: .2s; @@ -163,7 +166,7 @@ // Circle @circle-text-color: @text-color; -@circle-text-font-weight: 500; +@circle-text-font-weight: @font-weight-bold; @circle-text-font-size: @font-size-md; @circle-text-line-height: 18px; @@ -233,7 +236,7 @@ @dialog-transition: @animation-duration-base; @dialog-border-radius: 4px; @dialog-background-color: @white; -@dialog-header-font-weight: 500; +@dialog-header-font-weight: @font-weight-bold; @dialog-header-line-height: 24px; @dialog-header-padding-top: @padding-lg; @dialog-header-isolated-padding: @padding-lg 0; @@ -302,7 +305,7 @@ // IndexAnchor @index-anchor-padding: 0 @padding-md; @index-anchor-text-color: @text-color; -@index-anchor-font-weight: 500; +@index-anchor-font-weight: @font-weight-bold; @index-anchor-font-size: @font-size-md; @index-anchor-line-height: 32px; @index-anchor-background-color: transparent; @@ -317,7 +320,7 @@ @info-color: @white; @info-padding: 0 3px; @info-font-size: @font-size-sm; -@info-font-weight: 500; +@info-font-weight: @font-weight-bold; @info-border-width: 1px; @info-background-color: @red; @info-dot-color: @red; @@ -496,7 +499,7 @@ @sidebar-padding: 20px @padding-sm 20px @padding-xs; @sidebar-active-color: @active-color; @sidebar-background-color: @background-color-light; -@sidebar-selected-font-weight: 500; +@sidebar-selected-font-weight: @font-weight-bold; @sidebar-selected-text-color: @text-color; @sidebar-selected-border-color: @red; @sidebar-selected-background-color: @white; @@ -673,6 +676,8 @@ @uploader-file-background-color: @background-color; @uploader-file-icon-size: 20px; @uploader-file-icon-color: @gray-darker; +@uploader-file-name-padding: 0 @padding-base; +@uploader-file-name-margin-top: @padding-xs; @uploader-file-name-font-size: @font-size-sm; @uploader-file-name-text-color: @gray-darker; diff --git a/src/submit-bar/index.less b/src/submit-bar/index.less index 0f94e7f89..9ab448b41 100644 --- a/src/submit-bar/index.less +++ b/src/submit-bar/index.less @@ -39,7 +39,7 @@ flex: 1; padding-right: @padding-sm; color: @submit-bar-text-color; - font-weight: 500; + font-weight: @font-weight-bold; text-align: right; span { diff --git a/src/tabs/index.less b/src/tabs/index.less index 14b10f9c1..6fcf76e49 100644 --- a/src/tabs/index.less +++ b/src/tabs/index.less @@ -18,7 +18,7 @@ &--active { color: @tab-active-text-color; - font-weight: 500; + font-weight: @font-weight-bold; } &--disabled { diff --git a/src/uploader/index.less b/src/uploader/index.less index 263e44c1f..be6abbe78 100644 --- a/src/uploader/index.less +++ b/src/uploader/index.less @@ -86,8 +86,8 @@ &-name { box-sizing: border-box; width: 100%; - margin-top: @padding-xs; - padding: 0 5px; + margin-top: @uploader-file-name-margin-top; + padding: @uploader-file-name-padding; color: @uploader-file-name-text-color; font-size: @uploader-file-name-font-size; text-align: center;