···220></script>
221```
22200000000000223## Themes
224225dev.css supports custom colors and fonts through themes. You can find some pre-made themes in the `/theme` folder. To use a theme, simply apply it after the dev.css stylesheet. There are night and day themes, a set of Catppuccin themes, and a terminal theme. For example, to apply the terminal theme, add the following line after the `dev.css` import:
···220></script>
221```
222223+### `responsive-sidebar.js`
224+225+This addon automatically opens and closes `<details>` elements inside sidebars at the 82rem breakpoint. This prevents sidebars from looking awkward on wide screens and improves usability on small screens. To use this addon, add the following line after the `dev.css` import:
226+227+```html
228+<script
229+ src="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@4/addon/responsive-sidebar.min.js"
230+ defer
231+></script>
232+```
233+234## Themes
235236dev.css supports custom colors and fonts through themes. You can find some pre-made themes in the `/theme` folder. To use a theme, simply apply it after the dev.css stylesheet. There are night and day themes, a set of Catppuccin themes, and a terminal theme. For example, to apply the terminal theme, add the following line after the `dev.css` import:
+10
addon/responsive-sidebar.js
···0000000000
···1+/* responsive-sidebar for dev.css v4, a lightweight CSS framework - https://github.com/intergrav/dev.css */
2+/* about: auto open/close `aside article details` at 82rem breakpoint. prevents sidebar from looking awkward on wide screens, improves usability on small screens */
3+4+const mediaQuery = matchMedia("(min-width: 82rem)");
5+const toggleDetails = (matches) =>
6+ document
7+ .querySelectorAll("aside article details")
8+ .forEach((details) => details.toggleAttribute("open", matches));
9+toggleDetails(mediaQuery.matches);
10+mediaQuery.addEventListener("change", (event) => toggleDetails(event.matches));