Skip to main content

about custom theme development from Bootstrap

 

Hello,

I want to create a new theme from scratch with the Bootstrap framework.
I have switched my site to a new custom theme with Bootstrap framework.
I have installed ion my Mac the NationBuilder Theme Sync for Mac and downloaded the theme files.
It seems that there are a lot of imports.
There are :
theme.scss
_theme.scss
_variables.scss
etc
In the doc it is said that we should modify the theme.scss file, but with all those imports, I have a doubt.
Should I override of the existing Bootstrap styles in theme.scss, or should I modify directly all the files like _them.scss, etc ?
Thanks a lot in advance for your response !!

 

Official response from

Hey Marie,

What you're seeing is the SASS powered version of Bootstrap 3, which is separated out into various partial stylesheets that get compiled and delivered as one .css file to the live site.

Because Bootstrap's various @imports are going to perform calculations based on based variables defined in _variables.scss for instance, it's usually best to edit that file directly, or to create a new version of that file and replace the original @import in _bootstrap.scss with your new file.

You're still able to add custom styles and do overwrites at the bottom of theme.scss, after all of the @imports, but you might find it more difficult than simply editing the base variables to do basic stylistic changes.

Share this post

Showing 5 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.