Bootstrap Customization SASS Variables Override Not Working

后端 未结 2 1022
北海茫月
北海茫月 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: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

提交回复
热议问题