Skip to content
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

Replace icon fonts with SVG icons #3797

Open
vrih opened this issue Dec 1, 2018 · 4 comments
Open

Replace icon fonts with SVG icons #3797

vrih opened this issue Dec 1, 2018 · 4 comments

Comments

@vrih
Copy link

vrih commented Dec 1, 2018

Wallabag is pretty much unusable if 3rd party fonts are disabled. The interface is fully reliant on material icon font. Github have a good article on why they moved away from icon fonts.

@Kdecherf Kdecherf added the UI label Dec 1, 2018
@techexo
Copy link
Contributor

techexo commented Dec 3, 2018

If it can help, I tracked the direct link to SVG files for Material Icons.

Top bar and article list view

https://material.io/tools/icons/static/icons/baseline-add-24px.svg
https://material.io/tools/icons/static/icons/baseline-search-24px.svg
https://material.io/tools/icons/static/icons/baseline-filter_list-24px.svg
https://material.io/tools/icons/static/icons/baseline-get_app-24px.svg (replace file_download)
https://material.io/tools/icons/static/icons/baseline-view_module-24px.svg
https://material.io/tools/icons/static/icons/baseline-view_list-24px.svg
https://material.io/tools/icons/static/icons/baseline-rss_feed-24px.svg

https://material.io/tools/icons/static/icons/baseline-more_vert-24px.svg
https://material.io/tools/icons/static/icons/baseline-clear-24px.svg

Others are identical with lateral bar

Lateral bar

https://material.io/tools/icons/static/icons/baseline-arrow_back-24px.svg
https://material.io/tools/icons/static/icons/baseline-link-24px.svg
https://material.io/tools/icons/static/icons/baseline-refresh-24px.svg
https://material.io/tools/icons/static/icons/baseline-done-24px.svg
https://material.io/tools/icons/static/icons/baseline-star_border-24px.svg
https://material.io/tools/icons/static/icons/baseline-delete-24px.svg
https://material.io/tools/icons/static/icons/outline-label-24px.svg
https://material.io/tools/icons/static/icons/baseline-share-24px.svg
https://material.io/tools/icons/static/icons/baseline-print-24px.svg
https://material.io/tools/icons/static/icons/baseline-get_app-24px.svg (doublons)
https://material.io/tools/icons/static/icons/baseline-error-24px.svg

Article header & tile view

https://material.io/tools/icons/static/icons/baseline-timer-24px.svg
https://material.io/tools/icons/static/icons/baseline-today-24px.svg
https://material.io/tools/icons/static/icons/baseline-create-24px.svg
https://material.io/tools/icons/static/icons/baseline-person-24px.svg
https://material.io/tools/icons/static/icons/baseline-link-24px.svg (already used in lateral bar)
https://material.io/tools/icons/static/icons/baseline-comment-24px.svg

Config

https://material.io/tools/icons/static/icons/baseline-live_help-24px.svg

@Kdecherf
Copy link
Member

Kdecherf commented Dec 3, 2018

Should we insert the xml content of svg files inside the html content?

@techexo
Copy link
Contributor

techexo commented Dec 3, 2018

I think that's what Github did (via a helper) to allow for colorization via CSS. As some of the icons on wallabag are used in grey, black, and white, it would probably be the same thing?

I am wondering also if it wouldn't be a good idea to use CSS sprites and use SVG xlink : https://css-tricks.com/svg-sprites-use-better-icon-fonts/ and https://css-tricks.com/svg-symbol-good-choice-icons/
In that way, you load one time the SVG, and after that it is trivial to make a link to the desired icon in the code.

The downsides:

  • maybe not compatible with older browsers;
  • having to store some icons in multiple colors if we can't change it on the fly.

@techexo
Copy link
Contributor

techexo commented Dec 4, 2018

I have created a gist with the code for all the icons in symbol nodes.

More information on svg sprite on Google Material Icon page, and there seems to be ways for older browsers to fallback when they don't support svg.

Regarding the color, the icons can inherit the color of the text they are illustrating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants