NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/vxe-table/styles/checkbox.scss
2023-09-14 14:47:11 +08:00

150 lines
3.4 KiB
SCSS

/**Variable**/
@import './helpers/mixin.scss';
@import './base/common.scss';
/*checkbox-group*/
.vxe-checkbox-group {
display: inline-block;
vertical-align: middle;
line-height: 1;
}
/*checkbox*/
.vxe-checkbox {
display: inline-block;
vertical-align: middle;
white-space: nowrap;
user-select: none;
line-height: 1;
cursor: pointer;
&+.vxe-checkbox {
margin-left: 10px;
}
> input {
&[type="checkbox"] {
position: absolute;
width: 0;
height: 0;
border: 0;
appearance: none;
}
&+.vxe-checkbox--icon {
position: relative;
display: inline-block;
width: 1em;
height: 1em;
background-color: #fff;
vertical-align: middle;
border-radius: $vxe-checkbox-border-radius;
border: $vxe-checkbox-border-width solid $vxe-input-border-color;
&:before {
content: "";
position: absolute;
}
}
&:checked+.vxe-checkbox--icon {
background-color: $vxe-primary-color;
border-color: $vxe-primary-color;
&:before {
height: $vxe-checkbox-checked-height;
width: $vxe-checkbox-checked-width;
left: 50%;
top: 50%;
border: $vxe-checkbox-border-width solid #fff;
border-left: 0;
border-top: 0;
transform: translate(-50%, -50%) rotate(45deg);
}
&+.vxe-checkbox--label {
color: $vxe-primary-color;
}
}
}
&.is--indeterminate {
> input {
&:not(:checked) {
&+.vxe-checkbox--icon {
background-color: $vxe-primary-color;
border-color: $vxe-primary-color;
&:before {
border: 0;
left: 50%;
top: 50%;
height: $vxe-checkbox-indeterminate-height;
width: $vxe-checkbox-indeterminate-width;
background-color: #ffffff;
transform: translate(-50%, -50%);
}
}
}
}
}
&:not(.is--disabled) {
& > input {
&:focus {
&+.vxe-checkbox--icon {
border-color: $vxe-primary-color;
box-shadow: 0 0 0.2em 0 $vxe-primary-color;
}
}
}
&:hover {
> input {
&+.vxe-checkbox--icon {
border-color: $vxe-primary-color;
}
}
}
}
&.is--disabled {
cursor: not-allowed;
> input {
&+.vxe-checkbox--icon {
border-color: $vxe-input-disabled-color;
background-color: $vxe-input-disabled-background-color;
&:before {
border-color: #c0c4cc;
}
&+.vxe-checkbox--label {
color: $vxe-input-disabled-color;
}
}
&:checked+.vxe-checkbox--icon {
border-color: $vxe-input-disabled-color;
background-color: $vxe-input-disabled-background-color;
}
}
}
.vxe-checkbox--label {
padding-left: 0.5em;
vertical-align: middle;
display: inline-block;
max-width: 50em;
@extend %TextEllipsis;
}
}
.vxe-checkbox {
font-size: $vxe-font-size;
.vxe-checkbox--icon {
font-size: $vxe-checkbox-font-size-default;
}
&.size--medium {
font-size: $vxe-font-size-medium;
.vxe-checkbox--icon {
font-size: $vxe-checkbox-font-size-medium;
}
}
&.size--small {
font-size: $vxe-font-size-small;
.vxe-checkbox--icon {
font-size: $vxe-checkbox-font-size-small;
}
}
&.size--mini {
font-size: $vxe-font-size-mini;
.vxe-checkbox--icon {
font-size: $vxe-checkbox-font-size-mini;
}
}
}