Skip to content

refactor: Replace icon font with SVG icons #790

Merged
therobrob merged 15 commits intomainfrom
refactor/svg-icons
Apr 15, 2026
Merged

refactor: Replace icon font with SVG icons #790
therobrob merged 15 commits intomainfrom
refactor/svg-icons

Conversation

@MoritzWeber0
Copy link
Copy Markdown
Member

  • Only load used icons via SVGs instead of loading all icons via the font (this is more efficient as GitHub pages has no proper caching)

  • Avoid rendering issues when using slow internet connections:

    image

See also this discussion: #419 (comment)

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 29, 2026

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 934c037
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/69df260f5a9b750008f97cc0
😎 Deploy Preview https://deploy-preview-790--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@MoritzWeber0 MoritzWeber0 requested a review from therobrob March 29, 2026 13:49
@MoritzWeber0 MoritzWeber0 added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Mar 29, 2026
Copy link
Copy Markdown
Member

@therobrob therobrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you Moritz :) the icons have an other size than before, is this intended? In addition to the comments below, I noticed that the icons of the highlights are much smaller (14x14px), also of the buttons (15x15px) and dialog-close (15x15px). The line thickness of all icons is also different. The icon of the copy-toast is a little too high up.

Image

Image

Comment thread assets/sass/contentNavigation.scss Outdated
Comment thread assets/sass/fonts.scss
Comment thread assets/sass/navigation.scss Outdated
Comment thread assets/sass/search.scss Outdated
Comment thread assets/sass/search.scss Outdated
@MoritzWeber0
Copy link
Copy Markdown
Member Author

thank you Moritz :) the icons have an other size than before, is this intended? In addition to the comments below, I noticed that the icons of the highlights are much smaller (14x14px), also of the buttons (15x15px) and dialog-close (15x15px).

To some extend the size of the icons will vary as it's not straightforward to represent the exact size of the font. To be able to control the size of the icons via the font-size attribute as it was done before (and also makes sense to match the current text size for in-line icons), I use the em property, which is calculated considering parent elements, so the resulting numbers can be odd sometimes, but that's just a technical detail and shouldn't have larger visual effects.

I'll check the mentioned issues and will fix them as best as possible, thanks for checking 👍

The line thickness of all icons is also different. The icon of the copy-toast is a little too high up.

I couldn't find a way to derive the icon weight (different file) via the CSS weight / bold property. So for simplicity reasons, I removed the icons with weight 400 for now and just kept using the icons with weight 700; in comparison I liked them more.

@MoritzWeber0
Copy link
Copy Markdown
Member Author

MoritzWeber0 commented Apr 9, 2026

Image

It wasn't intentional, but I somehow like the smaller icons more. What do you think?

Image

This is fixed

@therobrob
Copy link
Copy Markdown
Member

Image

It wasn't intentional, but I somehow like the smaller icons more. What do you think?

Image

This is fixed

@MoritzWeber0 could you please check the images, they are broken. thanks!

@therobrob
Copy link
Copy Markdown
Member

therobrob commented Apr 12, 2026

thank you Moritz :) the icons have an other size than before, is this intended? In addition to the comments below, I noticed that the icons of the highlights are much smaller (14x14px), also of the buttons (15x15px) and dialog-close (15x15px).

To some extend the size of the icons will vary as it's not straightforward to represent the exact size of the font. To be able to control the size of the icons via the font-size attribute as it was done before (and also makes sense to match the current text size for in-line icons), I use the em property, which is calculated considering parent elements, so the resulting numbers can be odd sometimes, but that's just a technical detail and shouldn't have larger visual effects.

I'll check the mentioned issues and will fix them as best as possible, thanks for checking 👍

The line thickness of all icons is also different. The icon of the copy-toast is a little too high up.

I couldn't find a way to derive the icon weight (different file) via the CSS weight / bold property. So for simplicity reasons, I removed the icons with weight 400 for now and just kept using the icons with weight 700; in comparison I liked them more.

is there a reason, why you removed all commits before? It's more work to check the new changes because I can't see what they are. :(

I use the em property, which is calculated considering parent elements, so the resulting numbers can be odd sometimes, but that's just a technical detail and shouldn't have larger visual effects.

It's very important to me as a designer not to use odd values. Furthermore, I see no added value in implementing it that way. Can you please explain?

@MoritzWeber0
Copy link
Copy Markdown
Member Author

MoritzWeber0 commented Apr 12, 2026

is there a reason, why you removed all commits before? It's more work to check the new changes because I can't see what they are. :(

Are there specific commits you are missing? I still see 13 commits in the PR and can't remember removing any commits intentionally.

It's very important to me as a designer not to use odd values. Furthermore, I see no added value in implementing it that way. Can you please explain?

Explained here: #790 (comment).
However, I switched back to even values for the reasons mentioned.

@MoritzWeber0 MoritzWeber0 changed the title refactor: Replace icon font with SVG icons refactor: Replace icon font with SVG icons Apr 12, 2026
@MoritzWeber0 MoritzWeber0 requested a review from therobrob April 14, 2026 07:28
# Conflicts:
#	assets/sass/search.scss
Copy link
Copy Markdown
Member

@therobrob therobrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icons have the same size than before now. Thank you!
Sorry for being so persistent. 😅

@therobrob therobrob merged commit b60412d into main Apr 15, 2026
7 checks passed
@therobrob therobrob deleted the refactor/svg-icons branch April 15, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants