Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

federicobond
Copy link
Contributor

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.

@federicobond federicobond force-pushed the fix/override-font-styles branch from 79fb0a0 to 636b93e Compare June 1, 2024 11:30
@matthiask matthiask merged commit a0f0df9 into django-commons:main Jun 1, 2024
25 checks passed
@matthiask
Copy link
Member

Makes sense, thanks!

@federicobond federicobond deleted the fix/override-font-styles branch June 1, 2024 12:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants