From e0c57ccbf6cc8e8b3bc6ebd6bde7b0ff54e9f58f Mon Sep 17 00:00:00 2001 From: Rob Fletcher Date: Thu, 10 Jul 2014 20:40:55 +0100 Subject: [PATCH] Easier overriding of SCSS defaults Use `!default` for overridable variables in SCSS implementation. --- stylesheets/scss/grid.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stylesheets/scss/grid.scss b/stylesheets/scss/grid.scss index 0b937c1..df0a55e 100644 --- a/stylesheets/scss/grid.scss +++ b/stylesheets/scss/grid.scss @@ -3,9 +3,9 @@ ///////////////// // Defaults which you can freely override -$column-width: 60px; -$gutter-width: 20px; -$columns: 12; +$column-width: 60px !default; +$gutter-width: 20px !default; +$columns: 12 !default; // Utility function — you should never need to modify this @function gridsystem-width($columns:$columns) { @@ -13,7 +13,7 @@ $columns: 12; } // Set $total-width to 100% for a fluid layout -$total-width: gridsystem-width($columns); +$total-width: gridsystem-width($columns) !default; // Uncomment these two lines and the star-hack width/margin lines below to enable sub-pixel fix for IE6 & 7. See http://tylertate.com/blog/2012/01/05/subpixel-rounding.html // $min-width: 999999; @@ -64,4 +64,4 @@ body { } @mixin pull($offset:1) { margin-right: $total-width*((($gutter-width+$column-width)*$offset) / gridsystem-width($columns)) + $total-width*(($gutter-width*.5)/gridsystem-width($columns)); -} \ No newline at end of file +}