layui/src/component/button/index.less

131 lines
2.9 KiB
Plaintext
Raw Normal View History

@import (reference) "../../theme/variable.less";
2022-01-31 23:23:20 +00:00
2022-02-08 12:23:22 +00:00
@button-primary-color: var(--button-primary-color);
2022-03-28 20:46:30 +00:00
@button-primary-border-color: var(--button-primary-border-color);
@button-normal-color: var(--button-normal-color);
2022-03-28 20:46:30 +00:00
@button-normal-border-color: var(--button-normal-border-color);
@button-warm-color: var(--button-warm-color);
2022-03-28 20:46:30 +00:00
@button-warm-border-color: var(--button-warm-border-color);
@button-danger-color: var(--button-danger-color);
2022-03-28 20:46:30 +00:00
@button-danger-border-color: var(--button-danger-border-color);
@button-border-radius: var(--button-border-radius);
@button-border-color: var(--button-border-color);
2022-02-08 12:23:22 +00:00
:root {
--button-primary-color: @global-primary-color;
2022-03-28 20:46:30 +00:00
--button-primary-border-color: @global-primary-color;
--button-normal-color: @global-normal-color;
2022-03-28 20:46:30 +00:00
--button-normal-border-color: @global-normal-color;
--button-warm-color: @global-warm-color;
2022-03-28 20:46:30 +00:00
--button-warm-border-color: @global-warm-color;
--button-danger-color: @global-danger-color;
2022-03-28 20:46:30 +00:00
--button-danger-border-color: @global-danger-color;
--button-border-radius: @global-border-radius;
--button-border-color: @global-neutral-color-6;
2022-02-08 12:23:22 +00:00
}
2022-02-07 05:42:38 +00:00
.layui-btn {
height: 38px;
line-height: 36px;
padding: 0 18px;
font-size: 14px;
2022-01-31 23:23:20 +00:00
text-align: center;
white-space: nowrap;
2022-02-07 05:42:38 +00:00
border-radius: @button-border-radius;
2022-03-23 16:29:51 +00:00
border-color: @button-border-color;
border-width: 1px;
border-style: solid;
background: 0 0;
color: #666;
cursor: pointer;
}
2022-03-23 16:29:51 +00:00
.layui-btn:hover,
.layui-btn:active {
2022-03-23 16:29:51 +00:00
color: #333;
}
.layui-btn + .layui-btn {
margin-left: 10px;
}
.layui-btn-radius {
border-radius: 100px;
}
.layui-btn .layui-icon {
padding: 0 2px;
vertical-align: middle\9;
vertical-align: bottom;
}
.layui-btn-primary {
2022-03-23 16:29:51 +00:00
color: #fff;
background-color: @button-primary-color;
2022-03-28 20:46:30 +00:00
border-color: @button-primary-border-color;
}
.layui-btn-normal {
2022-03-23 16:29:51 +00:00
color: #fff;
background-color: @button-normal-color;
2022-03-28 20:46:30 +00:00
border-color: @button-normal-border-color;
}
.layui-btn-warm {
2022-03-23 16:29:51 +00:00
color: #fff;
background-color: @button-warm-color;
2022-03-28 20:46:30 +00:00
border-color: @button-warm-border-color;
}
.layui-btn-danger {
2022-03-23 16:29:51 +00:00
color: #fff;
background-color: @button-danger-color;
2022-03-28 20:46:30 +00:00
border-color: @button-danger-border-color;
2022-03-23 16:29:51 +00:00
}
.layui-btn-primary:hover,
.layui-btn-normal:hover,
.layui-btn-warm:hover,
.layui-btn-danger:hover {
color: #fff;
opacity: 0.8;
filter: alpha(opacity=80);
}
.layui-btn-lg {
height: 44px;
line-height: 44px;
padding: 0 25px;
font-size: 16px;
}
.layui-btn-sm {
height: 30px;
line-height: 30px;
padding: 0 10px;
font-size: 12px;
}
.layui-btn-xs {
height: 22px;
line-height: 22px;
padding: 0 5px;
font-size: 12px;
2022-01-31 23:23:20 +00:00
i {
font-size: 12px !important;
}
}
.layui-btn-fluid {
width: 100%;
}
2022-01-31 23:23:20 +00:00
.layui-btn-disabled,
.layui-btn-disabled:active,
.layui-btn-disabled:hover {
border-color: #eee !important;
background-color: #fbfbfb !important;
color: #d2d2d2 !important;
cursor: not-allowed !important;
opacity: 1;
}