| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- // button reset
- .ant-btn.ant-btn {
- border-radius: 15px;
- [data-theme='light'] &-default {
- color: @button-default-color;
- background-color: @button-default-bg-color;
- border-color: @button-default-border-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-default-hover-color;
- background-color: @button-default-hover-bg-color;
- border-color: @button-default-hover-border-color;
- }
- //&.active {
- // background-color: @button-default-hover-bg-color;
- // border-color: @button-default-hover-border-color;
- //}
- }
- &-primary {
- color: @white;
- background-color: @button-primary-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @white;
- background-color: @button-primary-hover-color;
- }
- &:not(&-background-ghost):not([disabled]) {
- color: @white;
- }
- &:disabled {
- color: @white;
- background-color: fade(@primary-color, 70%);
- }
- }
- &-link {
- &:hover,
- &:focus,
- &:active,
- &:not(:disabled):hover,
- &:not(:disabled):focus,
- &:not(:disabled):active {
- border-color: transparent !important;
- }
- }
- [data-theme='light'] &.ant-btn-link.is-disabled {
- color: rgb(0 0 0 / 25%);
- text-shadow: none;
- cursor: not-allowed !important;
- background-color: transparent !important;
- border-color: transparent !important;
- box-shadow: none;
- }
- [data-theme='dark'] &.ant-btn-link.is-disabled {
- color: rgb(255 255 255 / 25%) !important;
- text-shadow: none;
- cursor: not-allowed !important;
- background-color: transparent !important;
- border-color: transparent !important;
- box-shadow: none;
- }
- &-success.ant-btn-link:not([disabled='disabled']) {
- color: @button-success-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-success-hover-color;
- border-color: transparent;
- }
- &:active {
- color: @button-success-active-color;
- }
- }
- &-success.ant-btn-link.ant-btn-loading,
- &-warning.ant-btn-link.ant-btn-loading,
- &-error.ant-btn-link.ant-btn-loading,
- &-background-ghost.ant-btn-link.ant-btn-loading,
- &.ant-btn-link.ant-btn-loading {
- &::before {
- background: transparent;
- }
- }
- &-success:not(.ant-btn-link):not(.is-disabled) {
- color: @white;
- background-color: @button-success-color;
- border-color: @button-success-color;
- //border-width: 0;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @white;
- background-color: @button-success-hover-color;
- border-color: @button-success-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- background-color: @button-success-active-color;
- border-color: @button-success-active-color;
- }
- }
- &-warning.ant-btn-link:not([disabled='disabled']) {
- color: @button-warn-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-warn-hover-color;
- border-color: transparent;
- }
- &:active,
- &:not(:disabled):active {
- color: @button-warn-active-color;
- }
- }
- &-warning:not(.ant-btn-link):not(.is-disabled) {
- color: @white;
- background-color: @button-warn-color;
- border-color: @button-warn-color;
- //border-width: 0;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @white;
- background-color: @button-warn-hover-color;
- border-color: @button-warn-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- background-color: @button-warn-active-color;
- border-color: @button-warn-active-color;
- }
- }
- &-error.ant-btn-link:not([disabled='disabled']) {
- color: @button-error-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-error-hover-color;
- border-color: transparent;
- }
- &:active,
- &:not(:disabled):active {
- color: @button-error-active-color;
- }
- }
- &-error:not(.ant-btn-link):not(.is-disabled) {
- color: @white;
- background-color: @button-error-color;
- border-color: @button-error-color;
- //border-width: 0;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @white;
- background-color: @button-error-hover-color;
- border-color: @button-error-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- background-color: @button-error-active-color;
- border-color: @button-error-active-color;
- }
- }
- &-background-ghost {
- border-width: 1px;
- background-color: transparent !important;
- &[disabled],
- &[disabled]:hover {
- color: fade(@white, 40%) !important;
- background-color: transparent !important;
- border-color: fade(@white, 40%) !important;
- }
- }
- &-dashed&-background-ghost,
- &-default&-background-ghost {
- color: @button-ghost-color;
- border-color: @button-ghost-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-ghost-hover-color;
- border-color: @button-ghost-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- color: @button-ghost-active-color;
- border-color: @button-ghost-active-color;
- }
- &[disabled],
- &[disabled]:hover {
- color: fade(@white, 40%) !important;
- border-color: fade(@white, 40%) !important;
- }
- }
- &-background-ghost&-success:not(.ant-btn-link) {
- color: @button-success-color;
- background-color: transparent;
- border-color: @button-success-color;
- border-width: 1px;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-success-hover-color !important;
- border-color: @button-success-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- color: @button-success-active-color;
- border-color: @button-success-active-color;
- }
- }
- &-background-ghost&-warning:not(.ant-btn-link) {
- color: @button-warn-color;
- background-color: transparent;
- border-color: @button-warn-color;
- border-width: 1px;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-warn-hover-color !important;
- border-color: @button-warn-hover-color;
- }
- &:active {
- color: @button-warn-active-color;
- border-color: @button-warn-active-color;
- }
- }
- &-background-ghost&-error:not(.ant-btn-link) {
- color: @button-error-color;
- background-color: transparent;
- border-color: @button-error-color;
- border-width: 1px;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-error-hover-color !important;
- border-color: @button-error-hover-color;
- }
- &:active,
- &:not(:disabled):active {
- color: @button-error-active-color;
- border-color: @button-error-active-color;
- }
- }
- &-ghost.ant-btn-link:not([disabled='disabled']) {
- color: @button-ghost-color;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: @button-ghost-hover-color;
- border-color: transparent;
- }
- }
- &.purple {
- color: #fff !important;
- border-color: #605ca8 !important;
- background-color: #605ca8 !important;
- &:hover,
- &:focus,
- &:not(:disabled):hover,
- &:not(:disabled):focus {
- color: #fff !important;
- border-color: lighten(#605ca8, 10%) !important;
- background-color: lighten(#605ca8, 10%) !important;
- }
- }
- }
|