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

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

Open
1 of 5 tasks
maxpatiiuk opened this issue Oct 22, 2024 · 1 comment
Open
1 of 5 tasks

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

maxpatiiuk opened this issue Oct 22, 2024 · 1 comment
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.

Comments

@maxpatiiuk
Copy link
Member

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

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components
@maxpatiiuk maxpatiiuk added refactor Issues tied to code that needs to be significantly reworked. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Oct 22, 2024
@github-actions github-actions bot added the calcite-components Issues specific to the @esri/calcite-components package. label Oct 22, 2024
@bernier
Copy link

bernier commented Oct 28, 2024

`
@use 'sass:list';

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

@macandcheese macandcheese added p - low Issue is non core or affecting less that 10% of people using the library estimate - 5 A few days of work, definitely requires updates to tests. labels Feb 25, 2025
@DitwanP DitwanP added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

4 participants