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

Font Awesome v5 Sass Div Deprecation #18371

Open
vinnycodes opened this issue Oct 18, 2021 · 9 comments
Open

Font Awesome v5 Sass Div Deprecation #18371

vinnycodes opened this issue Oct 18, 2021 · 9 comments
Assignees
Labels
5.x Applies to Font Awesome Version 5 bug css enhancement

Comments

@vinnycodes
Copy link

Currently one of our sites uses font awesome v5.8 and getting the following errors:

`DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($fa-li-width * 5, 4)

More info and automated migrator: https://sass-lang.com/d/slash-div


6 │ margin-left: $fa-li-width * 5/4;
│ ^^^^^^^^^^^^^^^^^^

node_modules/@fortawesome/fontawesome-pro/scss/_list.scss 6:16 @import
node_modules/@fortawesome/fontawesome-pro/scss/fontawesome.scss 10:9 @import`

After doing some research I stumbled across this comment stating that this issue would be resolved in v5 and v6.

#17940 (comment)

Unfortunately, after updating to newer versions of Font Awesome v5, we are still having the above errors come up. Has this issue been resolved in v5 or are we still waiting for it to be updated?

@tagliala
Copy link
Member

Has this issue been resolved in v5 or are we still waiting for it to be updated?

Hi, yes, this is still the case in v5

I'm going to leave this open for tracking purposes

@tagliala tagliala added 5.x Applies to Font Awesome Version 5 bug css enhancement labels Oct 18, 2021
@robmadole
Copy link
Member

This fix will be released in the next version of 5 that goes out. Right now that is scheduled for about 1.5 months from now.

@vinnycodes
Copy link
Author

Thank you! I appreciate the update on this and we look forward to it.

mcmire added a commit to MetaMask/metamask-extension that referenced this issue Jan 5, 2022
Sass has changed the syntax for dividing two numbers. Previously you
would use `/`, but because this causes some ambiguity with color
functions (`rgb()`, `rgba()`, and the like), where `/` is regularly used
to separate color channel information from an alpha value, Sass has
deprecate the use of `/` for division. [1]

This commit converts all such usages to use `math.div()` instead. This
is a little bit difficult because there are a few places in
`@fortawesome/fontawesome-free` which use the old syntax. There is an
issue open here about it [2] but that has not been fixed yet. So we have
to patch this package to make the deprecation warnings go away.

[1]: https://sass-lang.com/documentation/breaking-changes/slash-div
[2]: FortAwesome/Font-Awesome#18371
mcmire added a commit to MetaMask/metamask-extension that referenced this issue Jan 7, 2022
Sass has changed the syntax for dividing two numbers. Previously you
would use `/`, but because this causes some ambiguity with color
functions (`rgb()`, `rgba()`, and the like), where `/` is regularly used
to separate color channel information from an alpha value, Sass has
deprecate the use of `/` for division. [1]

This commit converts all such usages to use `math.div()` instead. This
is a little bit difficult because there are a few places in
`@fortawesome/fontawesome-free` which use the old syntax. There is an
issue open here about it [2] but that has not been fixed yet. So we have
to patch this package to make the deprecation warnings go away.

[1]: https://sass-lang.com/documentation/breaking-changes/slash-div
[2]: FortAwesome/Font-Awesome#18371
@pableu
Copy link

pableu commented Jan 18, 2022

@robmadole any idea when a new version of 5 is going to be released with this fix?

@pasevin
Copy link

pasevin commented Feb 14, 2022

any updates on this issue?

@nicmare
Copy link

nicmare commented Mar 3, 2022

will there be an update of font awesome subsetter app too?

@yeya
Copy link

yeya commented Mar 3, 2022

Just upgrade to 6

@bobvandevijver
Copy link

A sample PR was already submitted quite a while back (#19117), it looks like support for 5.x has been dropped completely.

@tagliala
Copy link
Member

tagliala commented Oct 4, 2022

it looks like support for 5.x has been dropped completely.

FA6 has been a priority, but there are some fixes that should be backported to FA5 and as far as I know the support has not been dropped. Unfortunately we cannot merge here and the fix must be backward-compatible with other Sass implementation

@robmadole any ETA on when FA5 can receive these fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.x Applies to Font Awesome Version 5 bug css enhancement
Projects
None yet
Development

No branches or pull requests

8 participants