Opened 22 months ago

Last modified 6 months ago

#20597 assigned Cleanup/optimization

Replace admin icons images by an icon font.

Reported by: loic84 Owned by: anonymous
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: idangazit Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes


Some of the benefits of using an icon font:

  • Resolution independence: works well on Retina displays.
  • Can be customized by CSS: color, opacity, shadow, etc.
  • Most icon fonts offer a large collection of commonly used icons - while remaining small in file size - covering possible future needs.
  • Widespread browser support, including IE7 support.

I'd like to suggest Font-Awesome which is actively maintained, currently offers 361 icons and whose license is compatible with BSD.

A quick glance at the img assets of django.contrib.admin showed that most if not all icons have an equivalent in Font-Awesome.

Note: This issue was discussed on IRC with Idan and follows previous discussion on #19900.

Change History (7)

comment:1 Changed 22 months ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 22 months ago by loic84

Proof of concept that replaces the following:

  • add/change icons for each model on index.
  • add/change/delete icon on the recent items widget on index.
  • delete link icon on change_view.
  • yes/no/unknown images on boolean fields.

I committed a sample project to make it easy to review: just syncdb, runserver then head to /admin/.

comment:3 Changed 21 months ago by Einar Johannsson <hey@…>

  • Owner changed from nobody to anonymous
  • Status changed from new to assigned

comment:4 Changed 20 months ago by timo

Sample project looks good to me. I guess this approach supersedes #16216?

comment:5 Changed 6 months ago by collinanderson

  • UI/UX set

correct me if UX/UI is not proper here.

comment:6 Changed 6 months ago by iamstephenkerr

Should you not use the more up to date Font Awesome?

Last edited 6 months ago by iamstephenkerr (previous) (diff)

comment:7 Changed 6 months ago by collinanderson

I also wonder if at some point we'll want to switch to svg. Though, we would need to drop IE8 first.

Note: See TracTickets for help on using tickets.
Back to Top