Skip to content

Commit

Permalink
fix(input): make active checkbox/radio disable state more visible (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Mar 11, 2024
1 parent 5164fa8 commit ad21b8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
15 changes: 13 additions & 2 deletions lib/components/SInputCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,25 @@ function onClick() {
}
.SInputCheckbox.disabled {
.box {
.input {
cursor: not-allowed;
}
.input .box {
border-color: var(--input-disabled-border-color);
background-color: var(--input-disabled-bg-color);
&:hover { border-color: var(--input-disabled-border-color); }
&:focus:not(:focus-visible) { border-color: var(--input-disabled-border-color); }
}
.input { cursor: not-allowed; }
.input.on .box {
border-color: var(--c-border-info-1);
background-color: var(--c-blue-8);
}
.check-icon {
color: var(--c-white-a3);
}
}
</style>
14 changes: 12 additions & 2 deletions lib/components/SInputRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,24 @@ function onClick() {
}
.SInputRadio.disabled {
.box {
.input {
cursor: not-allowed;
}
.input .box {
border-color: var(--input-disabled-border-color);
background-color: var(--input-disabled-bg-color);
&:hover { border-color: var(--input-disabled-border-color); }
&:focus:not(:focus-visible) { border-color: var(--input-disabled-border-color); }
}
.input { cursor: not-allowed; }
.input.on .box {
border-color: var(--c-border-info-1);
}
.check {
background-color: var(--c-blue-9);
}
}
</style>

0 comments on commit ad21b8c

Please sign in to comment.