How to do version control of _custom.scss ?
See original GitHub issue- I have installed boostrap using
npm
. node_modules
is entirely ignored in gitignore.- I am supposed to make changes to
_custom.scss
to override variables. - If I do that, however, I can’t version control it.
- So I decided to create my own
_custom-variables.scss
.
What’s happening?
I created an app level scss file, say app.scss and tried to import bootstrap.scss
from node_modules and import my own _custom-variables.scss
after that. I did this so I can have access to all the variables set by bootstrap in _variables.scss
and then override the one I want in _custom-variables.scss
without the !default
option.
@import "../node_modules/bootstrap/scss/bootstrap.scss";
@import "custom-variables";
This however doesn’t seem to work. The values for variables aren’t getting overridden.
How can I solve this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
What do you do to enable Auto-Versioning of custom CSS and ...
Basically to force browser cache to invalidate when a new CSS or js is changed. No more CTRL-F5 for a user to ensure...
Read more >How to Customize Bootstrap with Sass - freeCodeCamp
In this tutorial, we are going to use the SCSS version. Whatever the style is, indented Sass or CSS-like SCSS, the Sass compiler...
Read more >How to Edit, Customize, and Override Bootstrap CSS to Suit ...
Go to your custom.scss file. You can import all Bootstrap's source Sass by including the following line of code. @import "../node_modules ...
Read more >Sass · Bootstrap v5.1
In your custom.scss , you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you...
Read more >How to customize Bootstrap 4 using Sass - Mugo Web
To get started, install Sass and get the latest Bootstrap 4 distribution. The current latest version of Bootstrap is 4.2.1. You'll need the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No idea on your particular setup. If you’re checking in Bootstrap’s source files, you can use it. Otherwise, use a different file outside
node_modules
to import all over Bootstrap and do your modifications there.I am sorry but I am still a bit confused.
So, if I do override values in
node_modules/bootstrap/scss/_custom.scss
and want it to be part of git repo, I need to explicitly add this file to git? or How?