Browse Source

💄 Add less variables for button shadow

close #14172
pull/14185/head
afc163 6 years ago
committed by 偏右
parent
commit
6f9f29799c
  1. 6
      components/button/style/mixin.less
  2. 3
      components/style/themes/default.less

6
components/button/style/mixin.less

@ -25,8 +25,8 @@
.button-variant-primary(@color; @background) { .button-variant-primary(@color; @background) {
.button-color(@color; @background; @background); .button-color(@color; @background; @background);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12); text-shadow: @btn-text-shadow;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045); box-shadow: @btn-primary-shadow;
&:hover, &:hover,
&:focus { &:focus {
@ -162,7 +162,7 @@
user-select: none; user-select: none;
transition: all 0.3s @ease-in-out; transition: all 0.3s @ease-in-out;
position: relative; position: relative;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015); box-shadow: @btn-shadow;
> .@{iconfont-css-prefix} { > .@{iconfont-css-prefix} {
line-height: 1; line-height: 1;
} }

3
components/style/themes/default.less

@ -132,6 +132,9 @@
@btn-font-weight : 400; @btn-font-weight : 400;
@btn-border-radius-base : @border-radius-base; @btn-border-radius-base : @border-radius-base;
@btn-border-radius-sm : @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-color : #fff;
@btn-primary-bg : @primary-color; @btn-primary-bg : @primary-color;

Loading…
Cancel
Save