Styling checkboxes on focus-visible
#863
Answered
by
claviska
mepatterson
asked this question in
Help
-
Beta Was this translation helpful? Give feedback.
Answered by
claviska
Aug 18, 2022
Replies: 1 comment 4 replies
-
Not sure what your hover/active states look like, but this should help. sl-checkbox::part(control) {
border-color: #181818;
border-radius: 4px;
outline-offset: 2px;
--sl-focus-ring: solid 2px #2663ea;
}
sl-checkbox[checked]::part(control) {
background-color: white;
color: black;
} Example: |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
mepatterson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what your hover/active states look like, but this should help.
Example:
https://codepen.io/claviska/pen/poLqqxj?editors=0100
Preview: