CSS only dark mode toggle with the :has() selector
![site profile thumbnail](https://uploads-ssl.webflow.com/65a04e27e5bdc641397138f9/65a15e40a83c57cba3f13b75_dark-mode.jpg)
The CSS :has() selector can be used to toggle dark mode, light mode, and themes with zero Javascript, just HTML and CSS. :has() finally arrived in all major browsers, having dropped in Firefox December 2023.