dekugrid

multiple implementations of the Deco Grid System  http://limi.net/deco.gs
git clone https://git.ce9e.org/dekugrid.git

commit
4bfc8a75d9ff8680b503832920ce1e5e9803b8bb
parent
f817dc236a7db576c72af5a0cb2025a0473fa01d
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2014-01-16 09:56
add option: prefix

Diffstat

M README.md 4 ++++
M decogrid.scss 9 +++++----

2 files changed, 9 insertions, 4 deletions


diff --git a/README.md b/README.md

@@ -16,5 +16,9 @@ between columns (the original decogrid provides 2.08333% and 0%).
   16    16 Just set the appropriate values for `$cols` and `$margin` and SASS will do all
   17    17 the math. In addition you get mixins to use in your existing classes.
   18    18 
   -1    19 decogrid.scss is designed as a drop-in replacement for decogrid.  However you
   -1    20 can set a `$prefix` for the generated CSS classes (e.g. `'deco-'`) to avoid
   -1    21 naming collisions.
   -1    22 
   19    23 [1]: http://www.alistapart.com/articles/fauxabsolutepositioning/
   20    24 [2]: http://sass-lang.com

diff --git a/decogrid.scss b/decogrid.scss

@@ -3,6 +3,7 @@
    3     3  */
    4     4 
    5     5 // Modify these to your needs.
   -1     6 $prefix: '';  // e.g. 'deco-'
    6     7 $cols: 12;
    7     8 $margin: 2.08333%;
    8     9 
@@ -31,10 +32,10 @@ $margin: 2.08333%;
   31    32 }
   32    33 
   33    34 // create classes
   34    -1 .row {@include row}
   35    -1 .cell {@include cell}
   -1    35 .#{$prefix}row {@include row}
   -1    36 .#{$prefix}cell {@include cell}
   36    37 
   37    38 @for $n from 1 through $cols {
   38    -1   .width-#{$n} {@include width($n)}
   39    -1   .position-#{$n - 1} {@include position($n - 1)}
   -1    39   .#{$prefix}width-#{$n} {@include width($n)}
   -1    40   .#{$prefix}position-#{$n - 1} {@include position($n - 1)}
   40    41 }