question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mdocommented, May 27, 2017

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.

0reactions
praveenpugliacommented, May 25, 2017

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found