Browse files

offset was LESS code and didn't work in Stylus.

  • Loading branch information...
1 parent e7ba0d8 commit 8ee9bf1af5bb4946f03cffb7014c2b3f175fbeab Patrick Heneise committed Jan 17, 2012
Showing with 24 additions and 24 deletions.
  1. +24 −24 stylesheets/styl/grid.styl
View
48 stylesheets/styl/grid.styl
@@ -16,45 +16,45 @@ total-width = _gridsystem-width
// Correcting percentage-to-pixel rounding errors in IE6 & 7
// See http://tylertate.com/blog/2012/01/05/subpixel-rounding.html
// Override @min with the minimum width of your layout
-min-width: 960;
-correction: 0.5 / min-width * 100 * 1%;
+min-width = 960
+correction = (((0.5 / min-width) * 100) * 1%)
// The micro clearfix http://nicolasgallagher.com/micro-clearfix-hack/
clearfix()
- *zoom:1
+ *zoom:1
- &:before,
- &:after
- content:""
- display:table
+ &:before,
+ &:after
+ content:""
+ display:table
- &:after
- clear:both
+ &:after
+ clear:both
//////////
// GRID //
//////////
body
- width 100%
- clearfix()
+ width 100%
+ clearfix()
row(columns = columns)
- display block
- width total-width * ((gutter-width + _gridsystem-width ) / _gridsystem-width)
- margin 0 total-width * (((gutter-width * 0.5) / _gridsystem-width ) * - 1)
- *width total-width * ((gutter-width + _gridsystem-width ) / _gridsystem-width)-correction
- *margin 0 total-width * (((gutter-width * 0.5) / _gridsystem-width ) * - 1)-correction
+ display block
+ width total-width * ((gutter-width + _gridsystem-width ) / _gridsystem-width)
+ margin 0 total-width * (((gutter-width * 0.5) / _gridsystem-width ) * - 1)
+ *width total-width * ((gutter-width + _gridsystem-width ) / _gridsystem-width)-correction
+ *margin 0 total-width * (((gutter-width * 0.5) / _gridsystem-width ) * - 1)-correction
column(x, columns = columns)
- display inline
- float left
- overflow hidden
- width total-width * ((((gutter-width + column-width ) * x) - gutter-width) / _gridsystem-width)
- margin 0 total-width * ( (gutter-width * 0.5) / _gridsystem-width)
- *width total-width * ((((gutter-width + column-width ) * x) - gutter-width) / _gridsystem-width)-correction
- *margin 0 total-width * ( (gutter-width * 0.5) / _gridsystem-width)-correction
+ display inline
+ float left
+ overflow hidden
+ width total-width * ((((gutter-width + column-width ) * x) - gutter-width) / _gridsystem-width)
+ margin 0 total-width * ( (gutter-width * 0.5) / _gridsystem-width)
+ *width total-width * ((((gutter-width + column-width ) * x) - gutter-width) / _gridsystem-width)-correction
+ *margin 0 total-width * ( (gutter-width * 0.5) / _gridsystem-width)-correction
offset(offset = 1)
- margin-left: @total-width*(((@gutter-width+@column-width)*@offset + (@gutter-width*0.5))/@_gridsystem-width);
+ margin-left total-width*(((gutter-width+column-width)*offset + (gutter-width*0.5))/_gridsystem-width)

0 comments on commit 8ee9bf1

Please sign in to comment.