question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Phase out icon font and use SVG everywhere

See original GitHub issue

In https://github.com/wagtail/wagtail/pull/4821 the menu font icons are replaced with SVG icons. It is a nice start. In this issue an overview of work to be done to have SVG icons everywhere.

We choose to switch to SVG icons for accessibility (title attr and aria labels). But SVG icons are also easier to maintain, customise and extend. All icons are all-ready converted to SVG. We need to dorp the icon font reference (CSS) and use the SVG icon like this:

{% load wagtailadmin_tags %}
{% icon name="rocket" classname="..." title="Launch" %}

The intention is to drop Wagtail font icon and CSS from future Wagtail releases. We need to decide what is needed for a proper deprecation process.

Priority

Icon font usage that needs to be refactored

Will be fixed as part of slim sidebar rework

  • Hamburger menu @allcaps Should this be a button? Currently a div.
  • Search submit button @allcaps
  • Main nav #footer. arrow down, account, logout
  • Main nav menuitem, sub-menu item

Will be fixed as part of the page editor 2022 project

Additional icon font work

Code cleanup

Documentation

Deprecation process

  • Two-release deprecation process if at all possible.
    • Remove any FontAwesome specific workaround (fa-).
    • Remove wagtail icon font (we need it for backward compatibility. So deprecate and remove at major release).
    • Remove choosers styles referring to icon-font.

I’d propose to keep this issue as a meta issue to keep track of progress. Work can be done in separate issues and pull requests. To keep pull requests reviewable.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
vicky1312commented, Oct 15, 2022

Alright @thibaudcolas I’ll work on it.

2reactions
thibaudcolascommented, Oct 14, 2022

👍 thanks for letting us know! @vicky1312 go for it if you’re still interested – either of the tasks in https://github.com/wagtail/wagtail/issues/6107#issuecomment-1276245262

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I use SVG, Icon Fonts, or Images? - Web-Crunch
Icon fonts came after the rise of web-based typography foundries starting creating glyph-based fonts for easier use.
Read more >
Let's End the Debate on Icon Fonts vs SVG Icons in 2021
Icon Fonts vs SVG Icons! This is a debate that shows no signs of abating and is splitting the dev community into two....
Read more >
Seriously, use icon fonts - Ben Frain
SVG or font – apart from maybe 10 total icons a user can recognize meaning, these are hieroglyphics. The answer is neither –...
Read more >
Icon Fonts vs SVG Icons: What Works Best for You?
Unlike PNG or JPEG images, SVG icons are scalable, so your webpage will not suffer from a loss in quality when visitors use...
Read more >
Moving to SVG icons - how to separate them from the code?
If you use SVG as background image then you cannot alter path and fill colors (AFAIK). However, you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found