django-commons / django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.
https://django-debug-toolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
8.08k stars 1.05k forks source link

Fix overriding font-family for both light and dark themes #1930

Closed federicobond closed 4 months ago

federicobond commented 4 months ago

The docs mention that the toolbar can be customized by overriding the --djdt-* variables defined in :root, like this:

:root {
    --djdt-font-family-primary: 'Roboto', sans-serif;
}

But with the implementation of dark theme support these same variables are also defined in #djDebug[data-theme="light"] with a higher specificity, so in reality you will need to match the specificity of that rule to override the variables.

This moves the font-family declarations to root so changes to the font-family on :root apply to both light and dark themes.

matthiask commented 4 months ago

Makes sense, thanks!