twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.58k stars 3.53k forks source link

How to config variables #2

Closed zetachang closed 13 years ago

zetachang commented 13 years ago

Twitter bootstrap has a file named preboot.less to set variable like gridColumns, but how can I do the same thing with bootstrap-sass. It seems that the imported file included in the file bootstrap.scss doesn't include preboot.scss.

grk commented 13 years ago

Try doing it like this: https://gist.github.com/1243355

thomas-mcdonald commented 13 years ago

Sorry for the late response, I've had a crazy week with essays and my uni application.

@grk's method should work pretty well for now. Creating an app-side variables.css.scss is something should be addressed in #1, but it appears sass-rails imports from the current directory if the file exists before looking through the asset paths, meaning it will use the gem's copy of variables.css.scss with the default helper manifest. I think this won't be so much of an issue if I create a new manifest that will live in app/assets on rake bootstrap:variables, (something like boostrap-custom.css.scss) since it should (hopefully) look in app/assets before going to the gem file, but I haven't had time this week to check it out properly.

thomas-mcdonald commented 13 years ago

@grk's method for configuring variables in bootstrap-sass will be recommended in the new documentation site (when I get it finished).

Whether it is with a generator or not is something I still haven't decided.