diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index cbf8b5571b..954c841c11 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -12,14 +12,11 @@ } .button-disabled(@color: @btn-disable-color; @background: @btn-disable-bg; @border: @btn-disable-border) { - &-disabled, - &.disabled, &[disabled] { &, &:hover, &:focus, - &:active, - &.active { + &:active { .button-color(@color; @background; @border); text-shadow: none; @@ -48,8 +45,7 @@ } } - &:active, - &.active { + &:active { & when (@theme = dark) { .button-color( @color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) ` @@ -80,8 +76,7 @@ ); } } - &:active, - &.active { + &:active { & when (@theme = dark) { .button-color(@primary-7; @background; @primary-7); } @@ -120,8 +115,7 @@ } } } - &:active, - &.active { + &:active { & when (@border = transparent) { & when (@theme = dark) { .button-color(~`colorPalette('@{color}', 5) `; transparent; transparent); @@ -171,11 +165,10 @@ position: relative; &:hover, &:focus, - &:active, - &.active { + &:active { z-index: 2; } - &:disabled { + &[disabled] { z-index: 0; } } @@ -238,7 +231,6 @@ outline: 0; box-shadow: none; } - &.disabled, &[disabled] { cursor: not-allowed; > * { @@ -265,8 +257,7 @@ .button-variant-other(@btn-default-color; @btn-default-bg; @btn-default-border); &:hover, &:focus, - &:active, - &.active { + &:active { text-decoration: none; background: @btn-default-bg; } @@ -302,8 +293,7 @@ ); } } - &:active, - &.active { + &:active { & when (@theme = dark) { .button-color( ~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5) @@ -356,7 +346,7 @@ } .button-disabled(@disabled-color; transparent; transparent); } -// link button style +// text button style .btn-text() { .button-variant-other(@text-color, transparent, transparent); box-shadow: none;