Skip to content

Fix dart sass 2.0 division deprecations#3544

Merged
mshibuya merged 2 commits into
railsadminteam:masterfrom
darrenterhune:dart-sass-2-0-deprecated-calc-upgrade-fontawesome-free
Jul 23, 2022
Merged

Fix dart sass 2.0 division deprecations#3544
mshibuya merged 2 commits into
railsadminteam:masterfrom
darrenterhune:dart-sass-2-0-deprecated-calc-upgrade-fontawesome-free

Conversation

@darrenterhune

@darrenterhune darrenterhune commented Jul 15, 2022

Copy link
Copy Markdown
Contributor

The src/rails_admin/styles/base/theming.scss used division calculations which causes deprecation warnings with dart sass >= 2.

The fontawesome-free version also has the same problem.

Using calc() around the division math fixes the issue in theming.scss
Upgrading fontawesome-free to the latest version fixes their issues

sass/sass#2565
sass/dart-sass#663

For rails projects using sassc this is a problem. The app I currently work on is on most recent gems and packages for everything. We do a really good job at keeping everything up to date. Unfortunately these warnings have now turned into errors being raised in webpacker-dev-server.

I tested these changes by publishing my own npm package while pointing our Gemfile to my forked version.

If we could get a minor release with this and any other minor fixes that may be in that would be really appreciated 😄

The src/rails_admin/styles/base/theming.scss used division calculations
which causes deprecation warnings with dart sass >= 2.

The fontawesome-free version also has the same problem.

Using calc() around the division math fixes the issue in theming.scss
Upgrading fontawesome-free to the latest version fixies their issue
@coveralls

coveralls commented Jul 15, 2022

Copy link
Copy Markdown

Coverage Status

Changes unknown
when pulling 1bc90c6 on darrenterhune:dart-sass-2-0-deprecated-calc-upgrade-fontawesome-free
into ** on railsadminteam:master**.

@codealchemy codealchemy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 (calc has been available in dart-sass since 1.40.0)

@mshibuya

Copy link
Copy Markdown
Member

Nice fix!
There are also vendorized css and fonts), to be used by Sprockets-only applications. Could you update them as well?

@darrenterhune

Copy link
Copy Markdown
Contributor Author

@mshibuya yeah I can update those today 😄

Fontawesome-free removed eot, svg and woff files and do not seem to be 
included anymore
@wartron

wartron commented Jul 22, 2022

Copy link
Copy Markdown

Thanks for fixing this.

@mshibuya mshibuya merged commit 44138c7 into railsadminteam:master Jul 23, 2022
@mshibuya

Copy link
Copy Markdown
Member

Thank you 🌟

mshibuya added a commit that referenced this pull request Aug 6, 2022
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

Successfully merging this pull request may close these issues.

5 participants