Skip to content

Commit

Permalink
Fix keyboard focus outline for toggles. Add CSS comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
replete committed Jun 9, 2024
1 parent 4422f3b commit 5d61a5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion biscuitman.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
}

&[disabled] {
display: none
display: none;
/* This rule is for the 'force' option */
}

&:hover {
Expand Down Expand Up @@ -355,6 +356,12 @@
}
}

&:has(:focus-within) {
/* Show focus outline correctly correctly with keyboard focus */
outline: auto;
outline-color:highlight; /* in Chrome the wrong colour is shown, this should make more sense */
}

&:has([disabled]:checked) {
opacity:0.6
}
Expand Down
2 changes: 1 addition & 1 deletion dist/biscuitman.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5d61a5d

Please sign in to comment.