{% load theme_tags theme_components static %} Theme Gallery {% theme_head include_js=True %} {% comment %} `|safe` is load-bearing, not a shortcut. Autoescaping rewrites the quotes in the generated CSS to `"`, so `html[data-theme="dark"]` is emitted as `html[data-theme="dark"]` — an invalid selector the browser discards. The `:root` block has no quotes, so it survives, and the page then applies the preset's root values while every dark-mode override falls back to whatever `theme_head` supplied. That reads as "only part of the theme loaded": the preset changes the background but the components keep the configured theme's colours. Safe because the value is generated by `ColorCSSGenerator` from a preset name already validated against the registry (see `_initial_preset`), not interpolated from request data. {% endcomment %}