From 6f9f29799c27e02af996a1ee9d5dc8e528ea38a8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Jan 2019 10:37:07 +0800 Subject: [PATCH] :lipstick: Add less variables for button shadow close #14172 --- components/button/style/mixin.less | 6 +++--- components/style/themes/default.less | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index 3eee51e936..a76003d27a 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -25,8 +25,8 @@ .button-variant-primary(@color; @background) { .button-color(@color; @background; @background); - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12); - box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045); + text-shadow: @btn-text-shadow; + box-shadow: @btn-primary-shadow; &:hover, &:focus { @@ -162,7 +162,7 @@ user-select: none; transition: all 0.3s @ease-in-out; position: relative; - box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015); + box-shadow: @btn-shadow; > .@{iconfont-css-prefix} { line-height: 1; } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index c06dfb2dd8..a645673e31 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -132,6 +132,9 @@ @btn-font-weight : 400; @btn-border-radius-base : @border-radius-base; @btn-border-radius-sm : @border-radius-base; +@btn-shadow: 0 2px 0 rgba(0, 0, 0, .015); +@btn-primary-shadow: 0 2px 0 rgba(0, 0, 0, 0.045); +@btn-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12); @btn-primary-color : #fff; @btn-primary-bg : @primary-color;