{%- if theme.colour and theme.colour.background == "preference" -%}
  <script>
    if (matchMedia("(prefers-color-scheme: dark)").matches)
      document.body.addClass("dark")
  </script>
{%- endif %}
