twbs / twbs/bootstrap-rubygem

Sass Division Depreciation Warning

Open
#220 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
2k
Forks
437
Avg merge
1h
Merged PRs (30d)
1

Description

When running a compiler on the scss files in this repository I recently got about 16 of these warnings pointing to various lines in 3 different file names:

Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($rfs-base-value, math.div($rfs-base-value * 0 + 1, $rfs-rem-value))

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

62 │   $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1 / $rfs-rem-value);

    .../bootstrap/vendor/_rfs.scss 62:20  @import

It looks like Sass is depreciating the / operator for division and replacing it with math.div(a, b); which requires the use of @use 'sass:math'; in the .scss files.

The files listed containing multiple instances of this error were:

  • /bootstrap/vendor/_rfs.scss
  • /boostrap/_variables.scss
  • /boostrap/_grid.scss

This is more of Bootstrap's problem than this gem specifically. I just wanted to share my discovery in case it leads to something more substantial later.
BTW. I'm only using the bootstrap-grid.scss file, so there may be more instances of division by \ that need replacing throughout.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by compiling the bootstrap-grid.scss entry point and review the reported division warnings in bootstrap/vendor/_rfs.scss, _variables.scss, and _grid.scss. Compare the warnings with the Sass division migration guidance mentioned in the issue. Done means the listed SCSS files compile without the reported deprecation warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
sass, scss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.