Comments (4)
Sorry, just realized that even more explicit instructions are needed. If the file containing the @import statement is loaded based on the default //= require_tree .
in application.css, then the file must be named so that it precedes all other files alphabetically. If it's named bootstrap_loader.css.scss and I have an apples.css.scss file containing custom CSS, the CSS in apples.css.scss will be clobbered by bootstrap.
There may be a way around this by using subdirectories and/or the 'stub' directive added to Sprockets 2.2.0. For now, naming the file "!bootstrap_loadfirst.css.scss" is a workaround. Other suggestions?
from bootstrap-sass.
Sorry, just realized that even more explicit instructions are needed. If the file containing the @import statement is loaded based on the default //= require_tree . in application.css, then the file must be named so that it precedes all other files alphabetically. If it's named bootstrap_loader.css.scss and I have an apples.css.scss file containing custom CSS, the CSS in apples.css.scss will be clobbered by bootstrap.
I think that, in general, if you're using Sass w/Rails, it's better to have a application.css.scss
file that uses @import
to require exactly the files you want to load, or to explicitly define the files you want to load (using //require x
), and in which order.
Having said that, the Readme isn't exactly clear wrt. require specifications. I'll see what I can cook up for 2.0.2.
from bootstrap-sass.
FWIW, here is what I'm using now. I created application and scopes directories under app/assets/stylesheets for my application-level and scope-level override stylesheets, respectively. Then I have these "top-level" files:
app/assets/stylesheets/application.css:
/*
* Load Bootstrap first so we can override it
*= require bootstrap_loader
* Application-level styles next
*= require_directory ./application
* Anything in this file is also application-level
*= require_self
* Finally the scope-level styles
*= require_directory ./scopes
* Note that we do NOT have the default "require_tree /." because we want to
* control the sequence of loads, especially getting Bootstrap loaded first.
*/
app/assets/stylesheets/bootstrap_loader.css.scss:
/* Do NOT name this file "bootstrap.css.scss" or you will get an @import loop. */
/* Override Bootstrap variables here */
// $primaryButtonBackground: #f00;
@import "bootstrap";
@import "bootstrap-responsive";
Seems to be working.
from bootstrap-sass.
Fixed in 2.0.2
from bootstrap-sass.
Related Issues (20)
- Bug on collapse HOT 1
- sass::syntaxerror Undefined mixin 'border-radius'
- php bin/console assetic:dump --env prod causes error
- Build fails: Unclosed string HOT 1
- Deprecation warnings with `Dart Sass 1.33.0` HOT 8
- Bootstrap-sass v3.3.7 generates a "Using / for division is deprecated and will be removed in Dart Sass 2.0.0." warning when using laravel mix HOT 1
- tooltip inside modal window, on hover of the element scroll bar goes to top - blocker
- math.div changes applied to non-division variables HOT 6
- Compatibility with gulp-sass 4.1.1 broken with bootstrap-sass 3.4.3 and 3.4.2 HOT 24
- Wrong use of Math.div. Breaks compilation HOT 1
- Update packagist for 3.4.3 HOT 7
- 3.4.2 has breaking change math.div HOT 3
- Grunt compass:dist task failing due to Invalid CSS in bootstrap-sass-official/assets/stylesheets/bootstrap/_variables.scss HOT 4
- Font glyphicons is affecting performance HOT 1
- Issue with tooltip
- Removal of sassc dependency HOT 5
- Well, it's only shown if it was already open: if (this._isShown()) {
- Fakeout
- Feature: Additional utilities for width and height property
- [WARNING] Expected ")" to end URL token [css-syntax-error]
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.