Skip to content

Commit

Permalink
style: 更新多选框样式
Browse files Browse the repository at this point in the history
  • Loading branch information
ArgoZhang committed Sep 10, 2024
1 parent cf04dac commit eb2456f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/BootstrapBlazor/Components/Select/MultiSelect.razor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
cursor: pointer;
transition: border 0.15s ease-in-out;

&.is-invalid {
border-color: var(--bs-form-invalid-border-color);
}

&.is-valid {
border-color: var(--bs-form-valid-border-color);
}

&.is-fixed {
--bb-multi-select-max-height: var(--bb-multi-select-min-height);
}
Expand All @@ -39,7 +47,7 @@
}
}

&:not(.disabled):hover {
&:not(.disabled):not(.is-valid):not(.is-invalid):hover {
border: 1px solid var(--bb-border-hover-color);
}

Expand Down
20 changes: 16 additions & 4 deletions src/BootstrapBlazor/wwwroot/src/css/motronic.css
Original file line number Diff line number Diff line change
Expand Up @@ -335,20 +335,32 @@
box-shadow: 0 0.25rem 0.5rem #0000001a;
}

.form-control.is-valid, .was-validated .form-control:valid {
.form-control.is-valid,
.multi-select .dropdown-toggle.is-valid,
.was-validated .form-control:valid {
border-color: var(--bs-success);
}

.was-validated .form-control:valid:focus, .form-control.is-valid:focus, .was-validated .custom-select:valid:focus, .custom-select.is-valid:focus {
.was-validated .form-control:valid:focus,
.form-control.is-valid:focus,
.multi-select .dropdown-toggle.is-valid:focus,
.was-validated .custom-select:valid:focus,
.custom-select.is-valid:focus {
border-color: var(--bs-success);
box-shadow: none;
}

.form-control.is-invalid, .was-validated .form-control:invalid {
.form-control.is-invalid,
.multi-select .dropdown-toggle.is-invalid,
.was-validated .form-control:invalid {
border-color: var(--bs-danger);
}

.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus, .was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus {
.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus,
.multi-select .dropdown-toggle.is-invalid:focus,
.was-validated .custom-select:invalid:focus,
.custom-select.is-invalid:focus {
border-color: var(--bs-danger);
box-shadow: none;
}
Expand Down

0 comments on commit eb2456f

Please sign in to comment.