#29936: Improved font customization in the admin
------------------------------------------------+------------------------
               Reporter:  Antonio Cavedoni      |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  contrib.admin         |        Version:  2.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  1
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  1                     |
------------------------------------------------+------------------------
 The admin is pretty flexible when it comes to formatting. One can extend
 the `extrastyle` block in the  `admin/base_site.html` (which is actually
 defined in `admin/base.html`) and override / inject whatever one may need
 in the stylesheet. However, when it comes to customizing the fonts in the
 admin, there currently is a big limitation due to the way the admin fonts
 (Roboto) are being loaded. `admin/css/base.css` is referenced in a non-
 extendable section of `admin/base.html`, and the first thing it does is to
 `@import fonts.css`, which in turn loads a bunch of woff files for Roboto.
 If one were to customize the fonts in their admin, they would still find
 themselves loading these woffs, even if unused.

 So I propose we remove the `@import` in `admin/css/base.css` and replace
 it with a `<link rel="stylesheet">` inside an overridable block in
 `base.html`. Right now I called it `adminfonts` for lack of a better name.

 With that in place, a project can extend `base_site.html`, empty out
 `adminfonts` and add whatever color / font customizations in the existing
 `extrastyle` block.

 This change would also offer some greater flexibility for users to at
 least improve the situation for themselves when it comes to Django’s
 default international font challenges—see issue #29122, for instance.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29936>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.504dfb7c77bc5650f1ec650953ce78b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to