thoughtbot / bitters

Add a dash of pre-defined style to your Bourbon.
https://thoughtbot.com
MIT License
1.39k stars 142 forks source link

Add default! to variables to allow easy overriding #108

Closed carmi closed 10 years ago

carmi commented 10 years ago

I want to override the default bitter variables such as $base-font-family and $header-font-family. Right now, since these do not have the SASS default! on them you need to do the following (at least I think you do):

@import "base/variables"

// Bitters Variable Overrides
$base-font-family: "Adobe Garamond W01", $serif
$header-font-family: "ITC Kabel W01", $base-font-family

@import "base/base"

If the default! was added I can just do

$base-font-family: "Adobe Garamond W01", $serif
$header-font-family: "ITC Kabel W01", $base-font-family

@import "base/base"

And my custom defined variables would stick.

Is there a reason not to do this? I will create a PR if people like this idea.

Thanks, Evan

carmi commented 10 years ago

@lisasy Thoughts on this?

kylefiedler commented 10 years ago

@carmi Bitters is a scaffold / boilerplate not a library because of that we expect you to actually change Bitters in your project not override it. Bitters is meant to be a good start for sass projects much like HTML boilerplate is a good start for an HTML 5 site. For more of a discussion about this please look at this thread here: https://github.com/thoughtbot/bitters/pull/32

whmii commented 10 years ago

Agreed, the variables file should be edited directly. Bitters is the house you move in to, not the foundation you build upon.

whmii commented 10 years ago

@carmi if you need a practical work around, I would create a duplicate version of the variables file and then import all the bitters modules independently after that. separate

Something like…

// Variables
@import "my-separate-variables-file";

// Neat Settings -- uncomment if using Neat -- must be imported before Neat
// @import "bitters/grid-settings";

// Extends
@import "bitters/extends/button";
@import "bitters/extends/clearfix";
@import "bitters/extends/errors";
@import "bitters/extends/flashes";
@import "bitters/extends/hide-text";

// Typography and Elements
@import "bitters/typography";
@import "bitters/forms";
@import "bitters/tables";
@import "bitters/lists";
@import "bitters/buttons";