Bootstrap Customization SASS Variables Override Not Working

后端 未结 2 1017
北海茫月
北海茫月 2021-01-26 18:23

Trying to customize Bootstrap as documented here: https://getbootstrap.com/docs/4.0/getting-started/options/

Here\'s my main.scss file:

@cha         


        
相关标签:
2条回答
  • 2021-01-26 18:37

    But you are importing the css file.

    Just download the sass source, import it and then you can edit bootstrap variables.

    0 讨论(0)
  • 2021-01-26 18:49

    You need to import the bootstrap/ scss after any variables that are changed to override the default variables..

    @import url('https://fonts.googleapis.com/css?family=Montserrat:500,700');
    
    $font-family-base: 'Montserrat', sans-serif; 
    $body-color: red;
    
    @import 'bootstrap';
    

    https://www.codeply.com/go/ZIRPuQ7E3x

    Also see: How to extend/modify (customize) Bootstrap 4 with SASS

    0 讨论(0)
提交回复
热议问题