-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make font families configurable #1757
Comments
I'm open to the idea of introducing more CSS variables into our CSS given that I have been the one to suggest and implement the CSS variables support for Django's admin panel :-) I generally don't think everything has to be configurable though, especially not for a debug-only tool. I don't immediately see the value of configurable font families either since we're using the same list of font families as Django's admin does, which should basically give a good fallback for every platform out there without having to provide web fonts of our own. The main value of the admin's configurability for me is that there's now an easy way to visually distinguish different environments of the same app (e.g. production and stage). I have never used the option to change the font family itself. So, long story short: I don't immediately see the benefits and I'm slightly against introducing the additional complexity given the previous point. I definitely won't do the work required myself but I'll certainly help with reviewing and releasing if it comes to that. Thanks! |
I fully agree with regards to the configurability and YAGNI. I have a specific need where I have to configure font families: I'm developing an opinionated set of Django tools which do ship and set a specific font for both the admin site as well as the debug toolbar. This is to ensure a consistent look for the admin site and the toolbar when developing locally and also for the CI tests (screenshots are part of the test suite). Theming support here is a relatively niche feature that I suppose not many would need (could be useful for third-party panel developers though), which is why I thought it's not worth documenting it yet. Nonetheless, making this work is a simple change that I think is worth doing. Then whenever a new need arises, the theming support can be extended further by simply introducing further CSS variables and refactoring the CSS a tiny bit accordingly. |
Currently it's not that simple to configure font families due to the way
toolbar.css
is written. It would be great if at least the font families were configurable via CSS variables (similar to how the Django admin site does it: https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#theming-support). The existingcss
block already allows us to inject custom CSS, so we could use the same technique if the style sheet was using variables.This is mostly to be able to make the look of the toolbar consistent across different systems.
The text was updated successfully, but these errors were encountered: