tabler / tabler-icons

A set of over 5500 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.03k stars 899 forks source link

fix: iconfont.scss added css charset utf-8 #843

Closed squishyu closed 1 year ago

squishyu commented 1 year ago

Sometimes Chrome doesn't load the icon webfont correctly and ends up displaying the icons with a default font. content broken icons correct icons

The user then has to reload the page without cache (ctrl+shift+r or browser restart)
Seems to be due to not specifying the CSS content type as UTF-8. (StackOverflow post with the same issue)

Adding

@charset "UTF-8";

as the first rule in the css file should fix the issue.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tabler-icons ✅ Ready (Inspect) Visit Preview Sep 23, 2023 3:02pm
codecalm commented 1 year ago

merged, thank you for your help! 🙂

squishyu commented 1 year ago

Sorry to bother, but I don't see the pull request actually being merged. Other PRs have a purple badge when merged, mine is just red as closed.

And I don't see my commit or my changes in the repo...

packages/icons-webfont/.build/iconfont.scss

/*!
 * Tabler Icons <%= v %> by tabler - https://tabler.io
 * License - https://github.com/tabler/tabler-icons/blob/master/LICENSE
 */
$ti-font-family: '<%= fileName %>' !default;
$ti-font-path: './fonts' !default;
$ti-font-display: null !default;
$ti-prefix: 'ti' !default;

@font-face {
  font-family: $ti-font-family;
...
codecalm commented 1 year ago

oh sorry, I want to close issue, but closed PR 😂