Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Summary/details are very difficult to style. You can approximate it using some hackery with a checkbox and sibling selectors. Here's an example that I was working on recently: https://smichel17.gitlab.io/donate

Source is here: https://gitlab.com/smichel17/smichel17.gitlab.io/-/blob/mast...

Note: accessibility is still WIP, because the toggle is not selectable with the keyboard. Should be solve-able though by hiding the checkbox via different means than `display: hidden` (ie, so the checkbox is visually hidden but still keyboard-selectable).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: