diff --git a/components/button/demo/basic.md b/components/button/demo/basic.md index 8806be2571..f63f7b9048 100644 --- a/components/button/demo/basic.md +++ b/components/button/demo/basic.md @@ -9,14 +9,10 @@ title: 按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮。主按钮在同一个操作区域最多出现一次。 -> `danger` 在 `antd@2.7` 后支持。 - ## en-US There are `primary` button, `default` button, `dashed` button and `danger` button in antd. -> `danger` is supported after `antd@2.7`. - ````jsx import { Button } from 'antd'; diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index 699aa8646b..51db8e1f42 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -16,12 +16,17 @@ &:active, &.active { .button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border); + text-shadow: none; + box-shadow: none; } } } .button-variant-primary(@color; @background) { .button-color(@color; @background; @background); + text-shadow: 0 -1px 0 rgba(0, 0, 0, .12); + box-shadow: 0 2px 0 rgba(0, 0, 0, .035); + &:hover, &:focus { .button-color(@color; ~`colorPalette("@{background}", 5)`; ~`colorPalette("@{background}", 5)`); @@ -158,6 +163,7 @@ user-select: none; transition: all .3s @ease-in-out; position: relative; + box-shadow: 0 2px 0 rgba(0, 0, 0, .015); > .@{iconfont-css-prefix} { line-height: 1; @@ -176,6 +182,7 @@ &:not([disabled]):active { outline: 0; transition: none; + box-shadow: none; } &.disabled,