djibe / material

Material Design 2 for Bootstrap 4 (active fork of Daemonite Material)
https://djibe.github.io/material/
MIT License
68 stars 11 forks source link

Using / for division is deprecated and will be removed in Dart Sass 2.0.0 #49

Closed halfpastfouram closed 2 years ago

halfpastfouram commented 2 years ago

Using sass 1.52.3 and sass-loader 12.6.0 I get the following deprecation warning over and over again:

Deprecation Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(9, 21)

More info and automated migrator: https://sass-lang.com/d/slash-div

node_modules/djibe-material/assets/scss/bootstrap/_responsive-embed.scss 48:29  @import
node_modules/djibe-material/assets/scss/material.scss 36:9                      @import
assets/styles/layout.scss 32:9                                                  @import
assets/styles/app.scss 1:9                                                      root stylesheet

145 repetitive deprecation warnings omitted.

I think it is caused by the following contents of _responsive-embed.scss:

.embed-responsive-1by1 {
  &::before {
    padding-top: percentage(1 / 1);
  }
}

.embed-responsive-4by3 {
  &::before {
    padding-top: percentage(3 / 4);
  }
}

.embed-responsive-16by9 {
  &::before {
    padding-top: percentage(9 / 16);
  }
}

.embed-responsive-21by9 {
  &::before {
    padding-top: percentage(9 / 21);
  }
}
djibe commented 2 years ago

Hi,

Bootstrap 4 and therefore Material are compiled with node-sass. Latest supported version is 5.

Projects won't be upgraded but for State of The Art SASS, you need to move to Bootstrap 5.

I'm sorry about that, and I am myself starting to struggle with node-sass 5 and compatible NodeJS versions.

Thanks for your comment, Best, djibe

halfpastfouram commented 2 years ago

That's a shame. I need a way to fix/prevent 158 of these errors for a client without replacing the entire bootstrap layout.

I'll post a solution here, if I ever find one.

djibe commented 2 years ago

Hi, a shame I don't know as BS4 is ageing.

However I'll try to see if 4.6.1 improves this: https://github.com/twbs/bootstrap/releases/tag/v4.6.1

djibe commented 2 years ago

Hi, I upgraded code BS 4.6.1

Everything in master branch is compatible with node-sass 6 and removes all errors when building. And now compatible with node 16+

djibe commented 2 years ago

I'll publish npm tomorrow