mdbootstrap / material-design-for-bootstrap

Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
https://mdbootstrap.com/docs/standard/
MIT License
9.34k stars 1.15k forks source link

sass compiling errors when working with mdb 4.4.0 & bootstrap 4.0.0-alpha.6 #75

Closed jenCape closed 7 years ago

jenCape commented 7 years ago

I just replaced my local copy of mdb 4.3.0 with mdb 4.4.0, but sass-loader complains when i tried to compile mdb with bootstrap.

main.scss:

@import '../vendor/bootstrap/css/bootstrap';
@import '../vendor/mdbootstrap/sass/mdb';

error:

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./src/css/main.scss
Module build failed: 
  0: (
    ^
      (x: 0, y: 0) isn't a valid CSS value.
      in /vendor/bootstrap/css/_variables.scss (line 145, column 6)
 @ ./src/css/main.scss 4:14-93
 @ ./src/js/main.js

this worked when I switched back to mdb 4.3.0, it also worked if I comment-out either of the two imports (so just @import '../vendor/bootstrap/css/bootstrap'; or just @import '../vendor/mdbootstrap/sass/mdb';)

I'm compiling everything with webpack:

 ...
module: {
    rules: removeEmpty([
        {
            test: /\.scss$/,
            exclude: /node_modules/,
            use: [
                'style-loader',
                'css-loader',
                'sass-loader?sourceMap'
            ]
        }
    ])
}
...
florantara commented 7 years ago

Same here. Although I'm not using webpack. It's complaining about the same line from the bootstrap _variables.scss file.

ascensus-mdb commented 7 years ago

That's because we do not use Alpha 6 in MDB 4.4.

As we wrote in change log (https://mdbootstrap.com/changelog/) we use experimental, not yet published version of Bootstrap Beta.

And as we wrote in disclaimer - if you need a stable version you should you MDB 4.3.2 still available on our website.

jenCape commented 7 years ago

how should we compile mdb 4.4? you've included bootstrap.js (though in the comments, it says v4.0.0-alpha.6, but i couldn't find the css files anywhere. and normalize appears to be missing without bootstrap

ascensus-mdb commented 7 years ago

Although comment says "alpha-6" it's a newer version.

As we wrote in changelog - "Dropped Normalize.css for Reboot.css (which is actually built upon Normalize.css)"

You have 2 choices:

  1. Use the newest, not yet published Bootstrap: https://github.com/twbs/bootstrap

  2. Use stable MDB 4.3.2: http://mdbootstrap.com/legacy/4.3.2/