Code Monkey home page Code Monkey logo

Comments (23)

dkrnl avatar dkrnl commented on September 27, 2024 119

npm i [email protected] --save-exact

from bootstrap.

bobitza avatar bobitza commented on September 27, 2024 42

i found same issue, how to fix please

npm i [email protected] --save-exact

It's worked

from bootstrap.

 avatar commented on September 27, 2024 15

downgrading from 1.77.8 to 1.74 does not resolve the issue

y'all REALLY want me to use tailwind huh

Edit: npm i [email protected] --save-exact works.

from bootstrap.

jdavidbakr avatar jdavidbakr commented on September 27, 2024 13

The issue appears to throw warnings but still builds for me ... but warnings are never fun to have. Hoping this gets an update soon.

from bootstrap.

ajiho avatar ajiho commented on September 27, 2024 11

I have also encountered this issue. My project, or adminlte, also requires some scss files that rely on bootstrap. If you want to eliminate this warning, I asked if you should release bootstrap 5.3.4 so that we can obtain scss files without warnings?

from bootstrap.

cotiga avatar cotiga commented on September 27, 2024 10

While waiting a fix... Edit the line in "package.json"
"sass": "^1.74",
by :
"sass": "1.77.6",
and do :
npm update

from bootstrap.

tang2087 avatar tang2087 commented on September 27, 2024 8

Getting same warning for my Nuxt project.

from bootstrap.

deepak-gangwar avatar deepak-gangwar commented on September 27, 2024 6

Found a solution βœ…

I fixed all the warnings by shifting my mixins to the end of styles. (There were a lot 🀯)

Earlier, this was giving me deprecation warnings:

 &__title {
    @include title-font;
    padding: 23px;

    @include bp-desktop {
      padding: 3vw 0 0;
    }
    
    &-inner {
      font-weight: normal';
    }
  }

You can see the bp-desktop and nested style is already at end, however the font mixin is before a normal padding style. Doing the following across the whole project fixed all warnings.

 &__title {
    padding: 23px;
    @include font-headline;

    @include bp-desktop {
      padding: 3vw 0 0;
    }
    
    &-inner {
      font-weight: normal';
    }
  }

I believe if you have any mixins or nested styles, move them after the regular styles. Put all regular styles at the start of the block. I hope this helps. 😊

from bootstrap.

martn001 avatar martn001 commented on September 27, 2024 4

I have encountered the same issues with my Vue/Vuetify project. Currently, I am receiving more then 60 different deprecation warnings for the latest version of the Vuetify package ^3.6.12. πŸ˜…

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/vuetify/lib/styles/tools/_typography.sass
3 β”‚     font-weight: $font-weight
  β”‚     ^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
  β•΅
  β”Œβ”€β”€> node_modules/vuetify/lib/styles/tools/_position.sass
3 β”‚ β”Œ     &--#{$position}
4 β”‚ β”‚       position: #{$position} if($important, !important, null)
  β”‚ └─── nested rule
  β•΅
    node_modules/vuetify/lib/styles/tools/_typography.sass 3:3           typography()
    node_modules/vuetify/lib/components/VSystemBar/VSystemBar.sass 23:5  @content
    node_modules/vuetify/lib/styles/tools/_layer.scss 9:5                layer()
    node_modules/vuetify/lib/components/VSystemBar/VSystemBar.sass 4:1   @use
    plugin-vuetify:components/VSystemBar/VSystemBar.sass 2:1            root stylesheet

from bootstrap.

hackel avatar hackel commented on September 27, 2024 4

FYI, to disable the deprecation warnings with Vite:

export default defineConfig(() => ({
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ['mixed-decls'],
      },
    },
  },
}));

from bootstrap.

vasiliy-l avatar vasiliy-l commented on September 27, 2024 3

For now, we can silence the warning until Bootstrap v5.3.4 is released #40651 (comment)

This can be done by using silenceDeprecations option. https://sass-lang.com/documentation/js-api/interfaces/options/#silenceDeprecations

Configs changes for webpack:

module.exports = {
  // ...

  module: {
    rules: [
      // ...

      {
        test: /\.s?[ac]ss$/i,
        use: [
          'style-loader',
          'css-loader',
          'postcss-loader',
          {
            loader: 'sass-loader',
            options: {
              sassOptions: {
                silenceDeprecations: ['mixed-decls'],
              },
            },
          },
        ],
      },
    ],
  },
};

from bootstrap.

pratik149 avatar pratik149 commented on September 27, 2024 2

I believe if you have any mixins or nested styles, move them after the regular styles. Put all regular styles at the start of the block.

Thank you @deepak-gangwar. You are right, I didn't need to downgrade or anything. Simply following the instruction provided in the warning helps resolve all the warnings. βœ…

from bootstrap.

euro avatar euro commented on September 27, 2024 1

FYI 1.77.8 of Dart Sass is out.
https://github.com/sass/dart-sass/releases/tag/1.77.8

from bootstrap.

Krisslk avatar Krisslk commented on September 27, 2024 1

npm i [email protected] --save-exact

thanks machan

from bootstrap.

frontierFlight avatar frontierFlight commented on September 27, 2024 1

https://sass-lang.com/documentation/breaking-changes/mixed-decls/

from bootstrap.

rajcracker avatar rajcracker commented on September 27, 2024 1

It's working for me Thanks
npm i [email protected] --save-exact

from bootstrap.

Asmmmir avatar Asmmmir commented on September 27, 2024

I got latest version of bootstrap, but I still got warnings

from bootstrap.

du-disk avatar du-disk commented on September 27, 2024

i found same issue, how to fix please

from bootstrap.

IAmShafqatAli avatar IAmShafqatAli commented on September 27, 2024

npm i [email protected] --save-exact

It worked for me too. Thank you so much.

from bootstrap.

martn001 avatar martn001 commented on September 27, 2024

I have encountered the same issues with my Vue/Vuetify project. Currently, I am receiving more then 60 different deprecation warnings for the latest version of the Vuetify package ^3.6.12. πŸ˜…

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/vuetify/lib/styles/tools/_typography.sass
3 β”‚     font-weight: $font-weight
  β”‚     ^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
  β•΅
  β”Œβ”€β”€> node_modules/vuetify/lib/styles/tools/_position.sass
3 β”‚ β”Œ     &--#{$position}
4 β”‚ β”‚       position: #{$position} if($important, !important, null)
  β”‚ └─── nested rule
  β•΅
    node_modules/vuetify/lib/styles/tools/_typography.sass 3:3           typography()
    node_modules/vuetify/lib/components/VSystemBar/VSystemBar.sass 23:5  @content
    node_modules/vuetify/lib/styles/tools/_layer.scss 9:5                layer()
    node_modules/vuetify/lib/components/VSystemBar/VSystemBar.sass 4:1   @use
    plugin-vuetify:components/VSystemBar/VSystemBar.sass 2:1            root stylesheet

The issue I encountered with my Vue/Vuetify project has been resolved by Vuetify. They fixed the problem in a newer version. So, if you run into these issues, the solution for Vue/Vuetify projects is to upgrade the Vuetify package from '^3.6.12' to '^3.6.14'.

image

from bootstrap.

RinNguyens avatar RinNguyens commented on September 27, 2024

npm i [email protected] --save-exact

it worked for meee. Tks bro

from bootstrap.

tang2087 avatar tang2087 commented on September 27, 2024

FYI, to disable the deprecation warnings with Vite:

export default defineConfig(() => ({
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ['mixed-decls'],
      },
    },
  },
}));

This is a good solution. I have updated for my Nuxt app:

export default defineNuxtConfig({
   devtools: { enabled: false },
   ssr: false,
   vite: {
      css: {
         preprocessorOptions: {
            scss: {
               silenceDeprecations: ["mixed-decls"]
            }
         }
      }
   },

}

from bootstrap.

olivarjoseluis avatar olivarjoseluis commented on September 27, 2024

npm i [email protected] --save-exact

It's work for me, thank you!

from bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.