Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Color Variables with bootstrap-sass

Getting around to using sass in my latest rails project, specifically the bootstrap-sass gem to get all of twitter bootstrappy goodness.

Is it possible to reference the variables already defined? The vendor /assets/stylesheets/bootstrap/_variables.scss file contains declarations for colors.

$blue: #049cdb !default;
$blueDark: #0064cd !default;
$green: #46a546 !default;
$red: #9d261d !default;

Do I need to redefine these in the top of my base application.css.scss file or can I import/reference the variables file? I've tried a couple of approaches like this:

$bodyBackground: $black;
@import 'bootstrap'

But that errors out with undefined variable $black.

like image 831
Peck Avatar asked Nov 03 '22 22:11

Peck


1 Answers

First, define the variable $black:

$black: #000;
$bodyBackground: $black;
@import "bootstrap";

or change it to:

$bodyBackground: #000;
@import "bootstrap";
like image 72
theforce Avatar answered Nov 07 '22 20:11

theforce