Skip to content

[BUG]: @import is deprecated #613

@Franiac

Description

@Franiac

Current Behavior

I use ngx-datatable with Angular and the compiler throws 2 warnings:


▲ [WARNING] Deprecation [plugin angular-sass]

    node_modules/@siemens/ngx-datatable/themes/material.scss:84:8:
      84 │ @import './ghost';
         ╵         ^                                                                                                                                                                                                                                                                                                


  Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
  
  More info and automated migrator: https://sass-lang.com/d/import

  The plugin "angular-sass" was triggered by this import

    angular:styles/global:styles:1:8:
      1 │ @import 'src/styles.scss';
        ╵         ~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                 


▲ [WARNING] Deprecation [plugin angular-sass]

    node_modules/@siemens/ngx-datatable/themes/material.scss:85:8:
      85 │ @import './rows';
         ╵         ^                                                                                                                                                                                                                                                                                                


  Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
  
  More info and automated migrator: https://sass-lang.com/d/import

  The plugin "angular-sass" was triggered by this import

    angular:styles/global:styles:1:8:
      1 │ @import 'src/styles.scss';
        ╵         ~~~~~~~~~~~~~~~~~             

This is legit, since @import has been deprecated for a very long time.
The simple fix would be to use @use instead of @import for all references.

Would you accept a PR for that?

Expected Behavior

Use @use instead of @import throughout the library.

Reproduction of the Issue

Add ngx-datatable to a new Angular app and compile => warnings appear.

Version

25.0.0

What browsers are you seeing the problem on?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions