example:
{{{
{% block extrastyle %}{{ block.super }}
<style>
:root {
--primary: red; /*will style primary red*/
}
</style>
{% endblock %}
{% block dark-mode-vars %}{{ block.super }}
<style>
:root {
--body-bg: green; /*will remain styled red in dark mode.*/
}
</style>
{% endblock %}
}}}
Also annoyingly styles applied in the "dark-mode-vars" block will leak to
lightmode if they are not protected with the media prefers-color-scheme
query.
This can be worked around by encasing the extrastyle styles in the
"prefers-color-scheme: light" query, but if this is going to remain the
behaviour the documentation should be updated to reflect it.
--
Ticket URL: <https://code.djangoproject.com/ticket/34399>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Sarah Boyce (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/34399#comment:1>