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

scss Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0. #694

Open
linonetwo opened this issue Feb 21, 2023 · 1 comment

Comments

@linonetwo
Copy link

linonetwo commented Feb 21, 2023

Solution: in package json

"postinstall": "sass-migrator -d division path/to/your.scss",

This solves

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($control-size - $control-size-sm, 2) or calc(($control-size - $control-size-sm) / 2)

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

    ╷
205 │   margin: ($control-size - $control-size-sm) / 2 0;
    │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules/spectre.css/src/_forms.scss 205:11  @import
    - 6:9     
    - ```
phinze added a commit to chicago-tool-library/circulate that referenced this issue Nov 13, 2023
Fast on the heels of 7.0 here comes the latest and greatest Rails
version!

# What it does

Gets us on Rails 7.1.

# Why it is important

Latest is greatest. And specifically this gets us access to background
preprocessing of variants for finishing #1150

# Implementation notes

* This gets us off the fork of `audited` we were using. The [change we
switched for was
upstreamed](collectiveidea/audited#609) and we
need the [more recent work to make it compatible with Rails
7.1](collectiveidea/audited#686). Just a couple
of code changes were needed and tests seem to be passing okay.
* Updates us to [Devise
4.9.3](https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#493---2023-10-11)
which added Rails 7.1 support.
- Note Devise 4.9.0 [added Hotwire + Turbo
support](https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#490---2023-02-17),
something we might want to take a look at in either #1184 or a follow on
task.
* Includes a bump to Postgres 15 for the Docker and CI setups to match
production.
* The new Rails defaults in 7.1 raise in controllers when you mention an
action that is not defined. This caught a couple of `before_action`
typos.
* Running `rake app:update` yielded diffs on many of the config files. I
took all the changes to `bin` scripts whole hog and merged the rest. A
second set of eyes across those diffs would be helpful though! 👀
* 💥 The upgrade caused an issue with threaded background work in tests
whose fix is at the bottom of `config/environments/test.rb` with a note
explaining.
* 💡 I had neglected to update the Yarn dependencies for Rails in the 7
upgrade, so catching those up here.
* 🚧 Asset compilation now runs on every execution of `bin/rails test`
which made the SCSS deprecation warnings get pretty annoying. Pulling in
a workaround from picturepan2/spectre#694
* Zeitwork (the new code autoloader) did not like
`lib/rails_solargraph.rb`, so following a [comment on the referenced
gist](https://gist.github.com/castwide/28b349566a223dfb439a337aea29713e?permalink_comment_id=4346127#gistcomment-4346127)
I switch us to the solargraph-rails gem.
@niutech
Copy link

niutech commented Apr 11, 2024

Check out my updated fork for this change.

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