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

Fix Sass deprecation warnings #40746

Closed
2 tasks done
elliotlarson opened this issue Aug 19, 2024 · 2 comments
Closed
2 tasks done

Fix Sass deprecation warnings #40746

elliotlarson opened this issue Aug 19, 2024 · 2 comments

Comments

@elliotlarson
Copy link

Prerequisites

Proposal

After upgrading Sass recently my build started outputting deprecation warnings:

16:26:25 css.1  | DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
16:26:25 css.1  | rules will be changing to match the behavior specified by CSS in an upcoming
16:26:25 css.1  | version. To keep the existing behavior, move the declaration above the nested
16:26:25 css.1  | rule. To opt into the new behavior, wrap the declaration in `& {}`.
16:26:25 css.1  |
16:26:25 css.1  | More info: https://sass-lang.com/d/mixed-decls
16:26:25 css.1  |
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/_reboot.scss
16:26:25 css.1  | 503 │     font-weight: $legend-font-weight;
16:26:25 css.1  |     │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
16:26:25 css.1  |     ╵
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/vendor/_rfs.scss
16:26:25 css.1  | 136 │ ┌     @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
16:26:25 css.1  | 137 │ │       @content;
16:26:25 css.1  | 138 │ │     }
16:26:25 css.1  |     │ └─── nested rule
16:26:25 css.1  |     ╵
16:26:25 css.1  |     bootstrap/scss/_reboot.scss 503:3                  @import
16:26:25 css.1  |     app/assets/stylesheets/shared/_bootstrap.scss 9:9  @import
16:26:25 css.1  |     app/assets/stylesheets/application.scss 8:9        root stylesheet
16:26:25 css.1  |
16:26:25 css.1  | DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
16:26:25 css.1  | rules will be changing to match the behavior specified by CSS in an upcoming
16:26:25 css.1  | version. To keep the existing behavior, move the declaration above the nested
16:26:25 css.1  | rule. To opt into the new behavior, wrap the declaration in `& {}`.
16:26:25 css.1  |
16:26:25 css.1  | More info: https://sass-lang.com/d/mixed-decls
16:26:25 css.1  |
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/_reboot.scss
16:26:25 css.1  | 504 │     line-height: inherit;
16:26:25 css.1  |     │     ^^^^^^^^^^^^^^^^^^^^ declaration
16:26:25 css.1  |     ╵
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/vendor/_rfs.scss
16:26:25 css.1  | 136 │ ┌     @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
16:26:25 css.1  | 137 │ │       @content;
16:26:25 css.1  | 138 │ │     }
16:26:25 css.1  |     │ └─── nested rule
16:26:25 css.1  |     ╵
16:26:25 css.1  |     bootstrap/scss/_reboot.scss 504:3                  @import
16:26:25 css.1  |     app/assets/stylesheets/shared/_bootstrap.scss 9:9  @import
16:26:25 css.1  |     app/assets/stylesheets/application.scss 8:9        root stylesheet
16:26:25 css.1  |
16:26:25 css.1  | DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
16:26:25 css.1  | rules will be changing to match the behavior specified by CSS in an upcoming
16:26:25 css.1  | version. To keep the existing behavior, move the declaration above the nested
16:26:25 css.1  | rule. To opt into the new behavior, wrap the declaration in `& {}`.
16:26:25 css.1  |
16:26:25 css.1  | More info: https://sass-lang.com/d/mixed-decls
16:26:25 css.1  |
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/_type.scss
16:26:25 css.1  | 38  │       font-family: $display-font-family;
16:26:25 css.1  |     │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
16:26:25 css.1  |     ╵
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/vendor/_rfs.scss
16:26:25 css.1  | 136 │ ┌     @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
16:26:25 css.1  | 137 │ │       @content;
16:26:25 css.1  | 138 │ │     }
16:26:25 css.1  |     │ └─── nested rule
16:26:25 css.1  |     ╵
16:26:25 css.1  |     bootstrap/scss/_type.scss 38:5                      @import
16:26:25 css.1  |     app/assets/stylesheets/shared/_bootstrap.scss 10:9  @import
16:26:25 css.1  |     app/assets/stylesheets/application.scss 8:9         root stylesheet
16:26:25 css.1  |
16:26:25 css.1  | DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
16:26:25 css.1  | rules will be changing to match the behavior specified by CSS in an upcoming
16:26:25 css.1  | version. To keep the existing behavior, move the declaration above the nested
16:26:25 css.1  | rule. To opt into the new behavior, wrap the declaration in `& {}`.
16:26:25 css.1  |
16:26:25 css.1  | More info: https://sass-lang.com/d/mixed-decls
16:26:25 css.1  |
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/_type.scss
16:26:25 css.1  | 39  │       font-style: $display-font-style;
16:26:25 css.1  |     │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
16:26:25 css.1  |     ╵
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/vendor/_rfs.scss
16:26:25 css.1  | 136 │ ┌     @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
16:26:25 css.1  | 137 │ │       @content;
16:26:25 css.1  | 138 │ │     }
16:26:25 css.1  |     │ └─── nested rule
16:26:25 css.1  |     ╵
16:26:25 css.1  |     bootstrap/scss/_type.scss 39:5                      @import
16:26:25 css.1  |     app/assets/stylesheets/shared/_bootstrap.scss 10:9  @import
16:26:25 css.1  |     app/assets/stylesheets/application.scss 8:9         root stylesheet
16:26:25 css.1  |
16:26:25 css.1  | DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
16:26:25 css.1  | rules will be changing to match the behavior specified by CSS in an upcoming
16:26:25 css.1  | version. To keep the existing behavior, move the declaration above the nested
16:26:25 css.1  | rule. To opt into the new behavior, wrap the declaration in `& {}`.
16:26:25 css.1  |
16:26:25 css.1  | More info: https://sass-lang.com/d/mixed-decls
16:26:25 css.1  |
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/_type.scss
16:26:25 css.1  | 40  │       font-weight: $display-font-weight;
16:26:25 css.1  |     │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
16:26:25 css.1  |     ╵
16:26:25 css.1  |     ┌──> node_modules/bootstrap/scss/vendor/_rfs.scss
16:26:25 css.1  | 136 │ ┌     @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
16:26:25 css.1  | 137 │ │       @content;
16:26:25 css.1  | 138 │ │     }
16:26:25 css.1  |     │ └─── nested rule
16:26:25 css.1  |     ╵
16:26:25 css.1  |     bootstrap/scss/_type.scss 40:5                      @import
16:26:25 css.1  |     app/assets/stylesheets/shared/_bootstrap.scss 10:9  @import
16:26:25 css.1  |     app/assets/stylesheets/application.scss 8:9         root stylesheet
16:26:25 css.1  |
16:26:26 css.1  | WARNING: 23 repetitive deprecation warnings omitted.

Motivation and context

It would be nice to fix the deprecations.

@louismaximepiton
Copy link
Member

louismaximepiton commented Aug 20, 2024

Duplicate of #40621. A patch has already been merged and will be in the next release, in the mean time, you can have some more information in the linked issue.

@louismaximepiton louismaximepiton closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@elliotlarson
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants