Comments (8)
I think in styles.loader.js, the custom file needs to come before the variables file
Notice: https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss#L18
If it comes before, it overrides it. Otherwise, for some reason, it's not getting pushed down?
from bootstrap-sass-loader.
@mmahalwy Order is important for sass. That's why there's two separate customization files. One for variables, and one for overriding the styles after they are declared. However, I think your point is valid.
The issue is that $brand-primary is being used by the other styles. I've only set $brand-primary and the other styles explicitly.
Based on checking the docs, I'd agree that we should change the order.
If I create a branch, will you try it out? Alternately, can you create a branch and create a PR? It would be nice to modify the example as well to show this use case.
Here's a reference: https://robots.thoughtbot.com/sass-default
from bootstrap-sass-loader.
Actually, I'll create a branch. Very simple.
from bootstrap-sass-loader.
@mmahalwy I'm not sure what to do about this one. I just tried, but in my use cases, I always refer to other bootstrap defined variables in my customization file. Check this out:
I'm guessing that I should just add another optional customization file. How's this look:
// Use preBootstrapCustomizations to change $brand-primary. Ensure this preBootstrapCustomizations does not
// depend on other bootstrap variables.
preBootstrapCustomizations: "./_pre-bootstrap-customizations.scss",
// Use bootstrapCustomizations to utilize other sass variables defined in preBootstrapCustomizations or the
// _variables.scss file. This is useful to set one customization value based on another value.
bootstrapCustomizations: "./_bootstrap-customizations.scss",
from bootstrap-sass-loader.
See #10
@mmahalwy Please try this and if it works for you, I'll push a new build.
See http://forum.railsonmaui.com/t/debugging-nodejs-and-webpack-loaders/142 for how to npm link to setup local copies, or specify the repo and branch in your package.json file.
I also created this to demonstrate the fix:
shakacode/bootstrap-sass-loader-example#3
Thanks for the input!
from bootstrap-sass-loader.
@mmahalwy If you look at this example, you can see how the package.json references the branch: shakacode/bootstrap-sass-loader-example#3
bootstrap-sass-loader": "justin808/bootstrap-sass-loader#fix-order-defaults-sass-import",
from bootstrap-sass-loader.
@justin808 going to give it a try later this evening. Sorry, lazt sunday and I am out :)
I'll try the PR and the examples and +1?
from bootstrap-sass-loader.
Solved!
from bootstrap-sass-loader.
Related Issues (20)
- Cannot load files... HOT 4
- File to import not found or unreadable with sass-loader 1.0.3 HOT 9
- @import scss file hot reload HOT 2
- 1.0.7 ERROR: Could not find path to config.bootstrapCustomizations HOT 3
- How to debug when HMR stops working? HOT 4
- Weird relative path behaviour HOT 8
- Placeholder for Bootstrap 4.0 HOT 15
- getting it to work HOT 2
- how do i include bootswatch customizations for _variables and _bootswatch? HOT 5
- extract text plugin HOT 3
- Add global wrapper for CSS Modules HOT 1
- Loading only bootstrap styles HOT 6
- "1.a Complete Bootstrap" not working for me HOT 2
- Feature request: Ability to turn off scripts and dependency on jquery HOT 2
- Migration to bootstrap-loader HOT 1
- bootstrap-sass-loader with eslint-loader HOT 2
- How can I access bootstrap variables? HOT 11
- Unable to parse fonts HOT 1
- Style loader class name spaced HOT 1
- t
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-sass-loader.