From f64519172e6fbb9d4f27bcef8a5d785de3eab6a7 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 20 Jul 2019 10:49:06 +0800 Subject: [PATCH] [improvement] ActionSheet: add less vars (#3908) --- src/action-sheet/index.less | 10 +++++----- src/style/var.less | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/action-sheet/index.less b/src/action-sheet/index.less index 77105b0b3..32659fd15 100644 --- a/src/action-sheet/index.less +++ b/src/action-sheet/index.less @@ -20,10 +20,10 @@ height: @action-sheet-item-height; &--disabled { - color: @gray; + color: @action-sheet-item-disabled-text-color; &:active { - background-color: @white; + background-color: @action-sheet-item-background; } } } @@ -36,8 +36,8 @@ &__cancel::before { display: block; - height: 10px; - background-color: @background-color; + height: @action-sheet-cancel-padding-top; + background-color: @action-sheet-cancel-padding-color; content: ' '; } @@ -51,7 +51,7 @@ position: absolute; top: 0; right: 0; - padding: 0 15px; + padding: @action-sheet-close-icon-padding; color: @action-sheet-close-icon-color; font-size: @action-sheet-close-icon-size; line-height: inherit; diff --git a/src/style/var.less b/src/style/var.less index 3a9b7c1c5..08abdba80 100644 --- a/src/style/var.less +++ b/src/style/var.less @@ -18,6 +18,10 @@ @active-color: #f2f3f5; @background-color: #f8f8f8; @background-color-light: #fafafa; +@padding-lg: 24px; +@padding-md: 16px; +@padding-sm: 12px; +@padding-xs: 8px; // ActionSheet @action-sheet-max-height: 90%; @@ -27,10 +31,14 @@ @action-sheet-item-background: @white; @action-sheet-item-font-size: 16px; @action-sheet-item-text-color: @text-color; +@action-sheet-item-disabled-text-color: @gray; @action-sheet-subname-color: @gray-darker; @action-sheet-subname-font-size: 12px; @action-sheet-close-icon-size: 18px; @action-sheet-close-icon-color: @gray-dark; +@action-sheet-close-icon-padding: 0 @padding-md; +@action-sheet-cancel-padding-top: @padding-xs; +@action-sheet-cancel-padding-color: @background-color; // AddressEdit @address-edit-buttons-padding: 30px 15px;