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

scss deprecation warning in _button-base.scss #663

Open
WayneYe opened this issue Sep 4, 2024 · 2 comments
Open

scss deprecation warning in _button-base.scss #663

WayneYe opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@WayneYe
Copy link

WayneYe commented Sep 4, 2024

Describe the bug
When i run npm i in my project I saw the following deprecation warnings:

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

    ┌──> node_modules/@material/button/_button-base.scss
169 │       min-width: 64px;
    │       ^^^^^^^^^^^^^^^ declaration
    ╵
    ┌──> node_modules/@material/elevation/_elevation-theme.scss
329 │ ┌   .mdc-elevation-overlay {
330 │ │     @include feature-targeting.targets($feat-structure) {
331 │ │       @include theme.property(width, $width);
332 │ │       @include theme.property(height, $height);
333 │ │
334 │ │       @if $has-content-sizing {
335 │ │         top: 0;
336 │ │         @include rtl.ignore-next-line();
337 │ │         left: 0;
338 │ │       } @else {
339 │ │         top: 50%;
340 │ │         @include rtl.ignore-next-line();
341 │ │         left: 50%;
342 │ │         transform: translate(-50%, -50%);
343 │ │       }
344 │ │     }
345 │ │   }
    │ └─── nested rule
    ╵
    node_modules/@material/button/_button-base.scss 169:5                   @content
    node_modules/@material/feature-targeting/_feature-targeting.scss 218:5  targets()
    node_modules/@material/button/_button-base.scss 163:3                   -root-structure()
    node_modules/@material/button/_button-base.scss 51:5                    -static-styles-base()
    node_modules/@material/button/_button-base.scss 38:3                    static-styles()
    node_modules/@material/button/_button.scss 84:3                         static-styles-without-ripple()
    node_modules/@material/button/_button.scss 79:3                         static-styles()

To Reproduce
Steps to reproduce the behavior:

  1. In any project uses "@smui/button": "^7.0.0"
  2. Run npm i
  3. Will see the above deprecation warnings

Expected behavior
There should be no deprecation warnings.

Screenshots
N/A.

Desktop (please complete the following information):

  • OS: OSX
  • Browser: N/A
  • Version: v7.0.0

Additional context
Add any other context about the problem here.

@WayneYe WayneYe added the bug Something isn't working label Sep 4, 2024
@NickantX
Copy link

NickantX commented Sep 4, 2024

As that warning suggests, this is an upstream issue with MDC-Web, and is not related to SMUI.

@WayneYe
Copy link
Author

WayneYe commented Sep 4, 2024

Thanks for pointing this out, I found this issue link: material-components/material-components-web#8196
So smui depends on @material/button whose latest release was 2 years ago, any suggestion I can fix this deprecation warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants