vue-vben-admin/src/design/ant/btn.less

204 lines
4.7 KiB
Plaintext
Raw Normal View History

2021-02-09 23:06:00 +08:00
// button reset
2020-09-28 20:19:10 +08:00
.ant-btn {
2021-02-05 01:07:36 +08:00
// display: inline-flex;
// justify-content: center;
// align-items: center;
2020-11-02 23:04:25 +08:00
// &.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;
// }
2020-11-15 13:22:34 +08:00
// &-group {
// .ant-btn:not(:first-child) {
// bottom: 1px;
// }
// }
2020-09-28 20:19:10 +08:00
&-primary {
color: @white;
background-color: @button-primary-color;
border-width: 0;
&:hover,
&:focus {
2021-02-03 23:52:55 +08:00
color: @white !important;
2020-09-28 20:19:10 +08:00
background-color: @button-primary-hover-color;
}
&[disabled],
&[disabled]:hover {
color: @white;
background-color: fade(@button-primary-color, 40%);
}
}
&-default {
color: @button-cancel-color;
background-color: @button-cancel-bg-color;
border-color: @button-cancel-border-color;
&:hover,
&:focus {
color: @button-cancel-hover-color;
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%);
}
}
&.ant-btn-link.is-disabled {
color: rgba(0, 0, 0, 0.25) !important;
text-shadow: none;
cursor: not-allowed;
background-color: transparent;
border-color: transparent;
box-shadow: none;
}
// color: @white;
&-success.ant-btn-link:not([disabled='disabled']) {
color: @button-success-color;
&:hover,
&:focus {
color: @button-success-hover-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) {
color: @white;
background-color: @button-success-color;
border-color: @button-success-color;
border-width: 0;
&:hover,
&:focus {
color: @white;
background-color: @button-success-hover-color;
border-color: @button-success-hover-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%);
}
}
&-warning.ant-btn-link:not([disabled='disabled']) {
color: @button-warn-color;
&:hover,
&:focus {
color: @button-warn-hover-color;
}
}
&-warning:not(.ant-btn-link) {
color: @white;
background-color: @button-warn-color;
border-color: @button-warn-color;
border-width: 0;
&:hover,
&:focus {
color: @white;
background-color: @button-warn-hover-color;
border-color: @button-warn-hover-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 ;
}
}
&-error.ant-btn-link:not([disabled='disabled']) {
color: @button-error-color;
&:hover,
&:focus {
color: @button-error-hover-color;
}
}
&-error:not(.ant-btn-link) {
color: @white;
background-color: @button-error-color;
border-color: @button-error-color;
border-width: 0;
&:hover,
&:focus {
color: @white;
background-color: @button-error-hover-color;
border-color: @button-error-hover-color;
}
&[disabled],
&[disabled]:hover {
color: @white;
background-color: fade(@button-error-color, 40%);
border-color: fade(@button-error-color, 40%);
// background-color: @button-error-disabled-color;
// border-color: @button-error-disabled-color ;
}
}
&-background-ghost.ant-btn-link,
&.ant-btn-dashed:not([disabled='disabled']) {
color: @text-color-call-out;
&:hover {
color: @button-primary-color;
}
}
&-ghost {
color: @button-ghost-color;
background-color: @white;
border-color: @button-ghost-color;
border-width: 1px;
&:hover,
&:focus {
color: @button-ghost-hover-color;
background-color: @button-ghost-hover-bg-color;
border-color: @button-ghost-hover-color;
}
&[disabled],
&[disabled]:hover {
color: @button-ghost-color;
background: fade(@white, 40%);
border-color: fade(@button-ghost-color, 40%);
}
}
}