WordPress / WordPress/Learn

Dart Sass Deprecation Warnings

Open
#1,040 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug
Dominant language
PHP
Stars
333
Forks
127
Avg merge
1d 7h
Merged PRs (30d)
11

Description

Description

When running yarn run create the following Dart Sass deprecation warnings are displayed.

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

Recommendation: math.div(100%, $grid-columns) or calc(100% / $grid-columns)

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

    ╷
127 │             width: 100% / $grid-columns * $i;
    │                    ^^^^^^^^^^^^^^^^^^^^
    ╵
    ../wporg/css/tools/_kube.scss 127:11  generate-grid-columns()
    ../wporg/css/generic/_kube.scss 43:1  @import
    css/generic/_generic.scss 1:9         @import
    css/style.scss 14:9                   root stylesheet

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

Recommendation: math.div(100%, $grid-columns) or calc(100% / $grid-columns)

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

    ╷
130 │             $width: 100% / $grid-columns * $i;
    │                     ^^^^^^^^^^^^^^^^^^^^
    ╵
    ../wporg/css/tools/_kube.scss 130:12  generate-grid-columns()
    ../wporg/css/generic/_kube.scss 43:1  @import
    css/generic/_generic.scss 1:9         @import
    css/style.scss 14:9                   root stylesheet

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

Recommendation: math.div(100%, $grid-columns) or calc(100% / $grid-columns)

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

    ╷
140 │                 $width: 100% / $grid-columns * $i;
    │                         ^^^^^^^^^^^^^^^^^^^^
    ╵
    ../wporg/css/tools/_kube.scss 140:13  generate-grid-columns()
    ../wporg/css/generic/_kube.scss 43:1  @import
    css/generic/_generic.scss 1:9         @import
    css/style.scss 14:9                   root stylesheet

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

Recommendation: math.div($grid-columns, $i) or calc($grid-columns / $i)

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

    ╷
143 │             $n: $grid-columns / $i + 1;
    │                 ^^^^^^^^^^^^^^^^^^
    ╵
    ../wporg/css/tools/_kube.scss 143:8   generate-grid-columns()
    ../wporg/css/generic/_kube.scss 43:1  @import
    css/generic/_generic.scss 1:9         @import
    css/style.scss 14:9                   root stylesheet

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

Recommendation: math.div($grid-columns, $i) or calc($grid-columns / $i)

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

    ╷
144 │             @if $n == floor( $n ) and ($grid-columns / $i) > 1 {
    │                                        ^^^^^^^^^^^^^^^^^^
    ╵
    ../wporg/css/tools/_kube.scss 144:31  generate-grid-columns()
    ../wporg/css/generic/_kube.scss 43:1  @import
    css/generic/_generic.scss 1:9         @import
    css/style.scss 14:9                   root stylesheet

Warning: 9 repetitive deprecation warnings omitted.

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 running yarn run create and inspect the deprecated division expressions in ../wporg/css/tools/_kube.scss at lines 127, 130, and 140-144. Follow the import path through css/generic/_generic.scss and css/style.scss; done means the build completes without these Dart Sass deprecation warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
sass
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.