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

Variable fa-version (scss,less) not being used in @font-face declaration #14856

Closed
1 of 4 tasks
aprat84 opened this issue Apr 4, 2019 · 2 comments
Closed
1 of 4 tasks

Comments

@aprat84
Copy link

aprat84 commented Apr 4, 2019

Describe the problem

In _variables.[scss|less] file, there is a fa-version variable, which is not used in @font-face declaration, to force font files refresh when updating to newer versions.
Happens in both SCSS and LESS, and in every style: brands/solid/regular/light.

What did you expect?

Font files URL should be suffixed with some query string variable to force browsers to fetch new files when updating, like it was in v4.7.0.

Something like this:

@font-face {
  font-family: 'Font Awesome 5 Pro';
  font-style: normal;
  font-weight: 900;
  font-display: $fa-font-display;
  src: url('#{$fa-font-path}/fa-solid-900.eot?v=#{$fa-version}');
  src: url('#{$fa-font-path}/fa-solid-900.eot?v=#{$fa-version}#iefix') format('embedded-opentype'),
  url('#{$fa-font-path}/fa-solid-900.woff2?v=#{$fa-version}') format('woff2'),
  url('#{$fa-font-path}/fa-solid-900.woff?v=#{$fa-version}') format('woff'),
  url('#{$fa-font-path}/fa-solid-900.ttf?v=#{$fa-version}') format('truetype'),
  url('#{$fa-font-path}/fa-solid-900.svg?v=#{$fa-version}#fontawesome') format('svg');
}

What version and implementation are you using?

Version: 5.8.1

  • SVG with JS
  • Web Fonts with SCSS/LESS
  • SVG Sprites
  • On the Desktop
@tagliala
Copy link
Member

tagliala commented Apr 4, 2019

Hi!

Thanks for being part of the Font Awesome Community.

We have removed this on purpose because it was causing issues with proxy servers and it is an old approach to invalidate files

If you still need this feature, feel free to customize the less/scss files as you wish

Ref: #3286 (and others)

Hope it helps

Closing here

@tagliala tagliala closed this as completed Apr 4, 2019
@aprat84
Copy link
Author

aprat84 commented Apr 4, 2019

Makes sense. Thanks for quick reply!

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

No branches or pull requests

2 participants