Include `.scss` file in another `.scss` file?

前端 未结 4 581
花落未央
花落未央 2020-12-16 11:04

How can I Include .scss file in another .scss file? I was trying to write this in a file: app.scss:

@include(\'buttons\');
@include         


        
4条回答
  •  一生所求
    2020-12-16 11:25

    Ok, so it appears to be that my app.scss file collide with Bootstrap.css file. Because I wanted the app.scss background property to apply, instead of the bootstrap css file. I've added !important in this property to override bootstrap style.:

    body 
    {
    background: #4d94ff !important; /* Used to override Bootstrap css settings. */
    }
    

    Also, gulpfile.js has been updated to suite my needs accordingly:

    var elixir = require('laravel-elixir');
    
    
    elixir(function (mix) {
    mix.sass('app.scss', 'resources/assets/css')
     .styles([
    'app.css'
     ], 'public/css/app.css');
     mix.version([
       'css/app.css'
        ]);
     });
    

    And that's how I fixed it.

提交回复
热议问题