#20597: Replace admin icons images by inline SVG
-------------------------------------+-------------------------------------
     Reporter:  loic84               |                    Owner:  anonymous
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Comment (by elky):

 Well, only week ago I was 100% happy with font icons. But after Collin's
 comment I vote for SVG (<img> with svg as a source).
 Below I listed advantages/disadvantages for both options.

 '''Font'''
 - Customizing. Changing icon color with CSS
 - Additional 100KB (font file + css)
 - Lots of changes in CSS, HTML and JS
 - To support IE8: just add *.ttf file (+ 70KB)
 - Code Diff: https://github.com/django/django/compare/master...elky:font-
 icons?diff=unified&name=font-icons

 '''SVG'''
 - Much less changes
 - Code is elegant - I actually ''just replaced'' gifs with svg in CSS. No
 pseudo-elements. No alignment tweaks
 - 25 additional files (requests) but just 19KB in total
 - To support IE8: add fallback in CSS (since we already have gif icons in
 the repo, my suggestion is to show them in IE8)
 - Code Diff: https://github.com/django/django/compare/master...elky:svg-
 icons?diff=unified&name=svg-icons

 And the final and main argument to choose SVG is that some apps use a bit
 overridden Django CSS classes so font approach may cause visual issues (I
 checked it with few CMS apps). So font approach is an extra headache for
 app developers.

--
Ticket URL: <https://code.djangoproject.com/ticket/20597#comment:16>
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/064.b9843adc58db918caabf4a33d20481e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to