//** Grid Settings **// //** Your basic units for the grid !grid_unit ||= "em" !total_cols ||= 16 !col_width ||= 4 !gutter_width ||= 1 !side_gutter_width ||= !gutter_width !container_width = container(!total_cols, !col_width, !gutter_width, !side_gutter_width) //** set on the outer grid containing element. =container(!align = "left") // clear all floated columns +clearfix // align the text back to the left (override for other alignments) :text-align= !align // use auto horizontal margins to center your page in the body :margin :left auto :right auto // set the page width based on column settings :width= !container_width + !grid_unit // never exceed 100% of the browser window (no side-scrolling) :max-width 100% //** set on any column element, even nested ones. the first agument [required] is the number of columns to span the second argument is the context (columns spanned by parent) this is required in any nested context by default a grid-col is floated left with a right gutter override that with +float("right"), +first or +last =columns(!n, !context = false) // the width of the column is set as a percentage of the context :width= columns(!n, !context) + "%" // the column is floated left +float("left") // the right gutter is added as a percentage of the context :margin-right= gutter(!context) + "%" //** set on any column to add empty colums before or after =prefix(!n, !context = false) :padding-left= columns(!n, !context) + gutter(!context) + "%" =suffix(!n, !context = false) :padding-right= columns(!n, !context) + gutter(!context) + "%" //** set on the first element of a row to take side-gutters into account - must override `!nested` for nested columns =alpha(!nested = false) @if !nested :margin-left 0 @else :margin-left= side_gutter() + "%" //** set on the last element of a row to take side-gutters into account - must override `!nested` for nested columns =omega(!n = false) @if !n :margin-right= 0 @else :margin-right= side_gutter() + "%" //** use to override +omega in ie.sass for IE6-7 to handle sub-pixel rounding issues - must override `!nested` for nested columns - must override `!right` for right-floated omega elements =ie-omega(!nested = false, !right = false) @if !right @if !nested :margin-right 0 @else :margin-right= side_gutter() + "%" :margin-left -1% @else @if !nested :margin-right= -1% @else :margin-right= side_gutter() - 1 + "%" //** set on an element that will span it's entire context =full(!n = false) +alpha(!n) +omega(!n) //** set as shortcut for prefix and suffix =pad(!p = 0, !s = 0, !c = false) @if !p != 0 +prefix(!p,!c) @if !s != 0 +suffix(!s,!c)