vben
2021-12-01 e024f6a6e76d531fa00d8895fb0cfca9f1cc15a4
src/design/ant/btn.less
@@ -1,42 +1,25 @@
// button reset
.ant-btn {
  // display: inline-flex;
  // justify-content: center;
  // align-items: center;
  // &.ant-btn-success:not(.ant-btn-link),
  // &.ant-btn-error:not(.ant-btn-link),
  // &.ant-btn-warning:not(.ant-btn-link),
  // &.ant-btn-primary:not(.ant-btn-link) {
  //   box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08) !important;
  // }
  // &-group {
  //   .ant-btn:not(:first-child) {
  //     bottom: 1px;
  //   }
  // }
  &-link:hover,
  &-link:focus,
  &-link:active {
    border-color: transparent !important;
  }
  //&-primary {
  //  color: @white;
  //  background-color: @button-primary-color;
  //  border-width: 0;
  //
  //  &:hover,
  //  &:focus {
  //    color: @white !important;
  //    background-color: @button-primary-hover-color;
  //  }
  //
  //  &[disabled],
  //  &[disabled]:hover {
  //    color: @white;
  //    background-color: fade(@button-primary-color, 40%);
  //  }
  //}
  &-primary {
    color: @white;
    background-color: @button-primary-color;
    &:hover,
    &:focus {
      color: @white;
      background-color: @button-primary-hover-color;
    }
  }
  &-primary:not(&-background-ghost):not([disabled]) {
    color: @white;
  }
  &-default {
    color: @button-cancel-color;
@@ -49,17 +32,17 @@
      background-color: @button-cancel-hover-bg-color;
      border-color: @button-cancel-hover-border-color;
    }
    //
    //&[disabled],
    //&[disabled]:hover {
    //  color: fade(@button-cancel-color, 40%);
    //  background: fade(@button-cancel-bg-color, 40%);
    //  border-color: fade(@button-cancel-border-color, 40%);
    //  color: fade(@button-cancel-color, 40%) !important;
    //  background: fade(@button-cancel-bg-color, 40%) !important;
    //  border-color: fade(@button-cancel-border-color, 40%) !important;
    //}
  }
  [data-theme='light'] &.ant-btn-link.is-disabled {
    color: rgba(0, 0, 0, 0.25);
    color: rgb(0 0 0 / 25%);
    text-shadow: none;
    cursor: not-allowed !important;
    background-color: transparent !important;
@@ -68,7 +51,7 @@
  }
  [data-theme='dark'] &.ant-btn-link.is-disabled {
    color: rgba(255, 255, 255, 0.25) !important;
    color: rgb(255 255 255 / 25%) !important;
    text-shadow: none;
    cursor: not-allowed !important;
    background-color: transparent !important;
@@ -102,11 +85,11 @@
    }
  }
  &-success:not(.ant-btn-link) {
  &-success:not(.ant-btn-link, .is-disabled) {
    color: @white;
    background-color: @button-success-color;
    border-color: @button-success-color;
    border-width: 0;
    //border-width: 0;
    &:hover,
    &:focus {
@@ -118,14 +101,6 @@
    &:active {
      background-color: @button-success-active-color;
      border-color: @button-success-active-color;
    }
    &[disabled],
    &[disabled]:hover {
      color: @white;
      background-color: fade(@button-success-color, 40%);
      // background-color: @button-success-disabled-color;
      border-color: fade(@button-success-color, 40%);
    }
  }
@@ -143,11 +118,11 @@
    }
  }
  &-warning:not(.ant-btn-link) {
  &-warning:not(.ant-btn-link, .is-disabled) {
    color: @white;
    background-color: @button-warn-color;
    border-color: @button-warn-color;
    border-width: 0;
    //border-width: 0;
    &:hover,
    &:focus {
@@ -161,15 +136,12 @@
      border-color: @button-warn-active-color;
    }
    &[disabled],
    &[disabled]:hover {
      color: @white;
      background-color: fade(@button-warn-color, 40%);
      border-color: fade(@button-warn-color, 40%);
      // background-color: @button-warn-disabled-color;
      // border-color: @button-warn-disabled-color ;
    }
    //&[disabled],
    //&[disabled]:hover {
    //  color: @white;
    //  background-color: fade(@button-warn-color, 40%);
    //  border-color: fade(@button-warn-color, 40%);
    //}
  }
  &-error.ant-btn-link:not([disabled='disabled']) {
@@ -186,11 +158,11 @@
    }
  }
  &-error:not(.ant-btn-link) {
  &-error:not(.ant-btn-link, .is-disabled) {
    color: @white;
    background-color: @button-error-color;
    border-color: @button-error-color;
    border-width: 0;
    //border-width: 0;
    &:hover,
    &:focus {
@@ -204,40 +176,45 @@
      border-color: @button-error-active-color;
    }
    &[disabled],
    &[disabled]:hover {
      color: @white;
      background-color: fade(@button-error-color, 40%);
      border-color: fade(@button-error-color, 40%);
    }
  }
  &-background-ghost.ant-btn-link,
  &.ant-btn-dashed:not([disabled='disabled']) {
    // color: @text-color-call-out;
    &:hover {
      color: @button-primary-color;
    }
    //&[disabled],
    //&[disabled]:hover {
    //  color: @white;
    //  background-color: fade(@button-error-color, 40%);
    //  border-color: fade(@button-error-color, 40%);
    //}
  }
  &-background-ghost {
    color: @button-ghost-color;
    background-color: transparent;
    border-color: @button-ghost-color;
    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 {
      color: @button-ghost-hover-color !important;
      background-color: @button-ghost-hover-bg-color;
      color: @button-ghost-hover-color;
      border-color: @button-ghost-hover-color;
    }
    &:active {
      color: @button-ghost-active-color;
      border-color: @button-ghost-active-color;
    }
    &[disabled],
    &[disabled]:hover {
      color: fade(@white, 40%) !important;
      background-color: fade(@white, 40%);
      border-color: fade(@white, 40%) !important;
    }
  }
@@ -260,7 +237,7 @@
    }
  }
  &-background-ghost&-warn:not(.ant-btn-link) {
  &-background-ghost&-warning:not(.ant-btn-link) {
    color: @button-warn-color;
    background-color: transparent;
    border-color: @button-warn-color;