Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow last to be passed to the column instead of having to be mixed i…

…n separately
  • Loading branch information...
commit c17a16843c64be72f0865dd6276aacca8cbdbf4e 1 parent c3d2d7c
@chriseppstein authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 blueprint/modules/_grid.sass
View
17 blueprint/modules/_grid.sass
@@ -34,18 +34,21 @@
:margin 0 auto
+clearfix
-// Use this mixins to set the width of n columns.
-=column(!n)
- :float left
- :margin-right = !layout_grid_margin
- :width = !layout_grid_width * !n + (!layout_grid_margin * (!n - 1))
-
// The last column in a row needs this mixin or it will end up on the next row.
// TODO add this to span mixin when we have optional arguments
=last
:margin
:right 0
+// Use this mixins to set the width of n columns.
+=column(!n, !last = false)
@chriseppstein Owner

Note: this change requires the default arguments capability that’s found on my default_arguments branch of haml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ :float left
+ :width = !layout_grid_width * !n + (!layout_grid_margin * (!n - 1))
+ @if !last
+ +last
+ @if ~!last
+ :margin-right = !layout_grid_margin
+
// Mixin to a column to append n empty cols.
=append(!n)
:padding-right = (!layout_grid_outer_width) * !n
@@ -115,7 +118,7 @@
// Use these classes (or mixins) to set the width of a column.
@for !n from 1 to !layout_grid_columns + 1
.span-#{!n}
- +column(!n)
+ +column(!n, !n == !layout_grid_columns)
// Add these to a column to append empty cols.
@for !n from 1 to !layout_grid_columns
.append-#{!n}
Please sign in to comment.
Something went wrong with that request. Please try again.