Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
295 stars 76 forks source link

[Sass] migrate away from deprecated global built-ins #10585

Open maxpatiiuk opened 1 month ago

maxpatiiuk commented 1 month ago

Description

After updating to latest sass on the lumina branch, I am seeing warnings like this:

Deprecation Warning: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use list.nth instead.

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

    ╷
176 │   $name: nth($notice-kind, 1);
    │          ^^^^^^^^^^^^^^^^^^^^
    ╵
    ../../../../packages/calcite-components/src/components/notice/notice.scss 176:10  root stylesheet

Looks like the code needs to be refactored. 6 usages of nth() in the calcite-components package. SCSS also provides a codemod for these usages.

Proposed Advantages

Avoids deprecated usage

Which Component

23 places across the codebase

Relevant Info

No response

Calcite package

bernier commented 1 month ago

` @use 'sass:list';

$name: list.nth($notice-kind, 1); `