Skip to content

Css/Sass changes warning #1250

Open
@rcsAlex

Description

@rcsAlex

CSS is changing the way it handles declarations mixed with nested rules, Sass (and therefore sass-loader) are making changes to match its behavior.

Current versions that I am using:

"bootstrap-sass": "^3.4.1",
"sass-loader": "^15.0.0"

The console warning

WARNING in  <removed>
node_modules/css-loader/dist/cjs.js??clonedRuleSet-5.use[1]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-5.use[2]!./<removed>)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Warning on line 101, column 2 of file:///Users/<path>/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_navbar.scss:101:2:
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

101 |   position: fixed;


node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_navbar.scss 102:3  @import
node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss 31:9          @import
app/javascript/src/stylesheets/pdf.scss 2:9                                  root stylesheet

 @ ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-5.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-5.use[1]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-5.use[2]!.

The styles at https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_navbar.scss#L101 need to be moved to the top of the block so that they continue to render the same going forward.

I'm happy to open a MR to fix this myself

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions