You've already forked system.css
mirror of
https://github.com/sakofchit/system.css.git
synced 2026-05-05 06:01:22 +09:00
Rework dropdown menus as <details>/<summary>
the hidden checkbox approach is brittle and not accessible (wrapping the entire checkbox and menu inside a `<label>`, not easy to add `:focus` style, etc)
This commit is contained in:
@@ -563,6 +563,7 @@ form {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.dd-toggle:focus,
|
||||
.dd-toggle:hover {
|
||||
background-color: black;
|
||||
color: white;
|
||||
@@ -581,14 +582,6 @@ form {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.dd-input + .dd-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dd-input:checked + .dd-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dd-menu li {
|
||||
padding: 5px 20px;
|
||||
cursor: pointer;
|
||||
|
||||
Reference in New Issue
Block a user