///////// 12/16 col 960 grid system /////////// // ---------------------------------------- // use example for a 12 col layout, 4 col width, conversion to %, add left/right padding and 1px border // @include grid(12, 4, $grid_padding: 36, $grid_border: 1); // // All values are entered as integers and conversion math is done in the mixin. // Do not enter combination values such as '36em' $border_place: ''; @mixin grid($col_count, $grid_child: $grid_child, $grid_padding_l: $grid_padding_l, $grid_padding_r: $grid_padding_r, $grid_padding_tb: $grid_padding_tb, $grid_border: $grid_border, $grid_uom: $grid_uom, $col_gutter: $col_gutter, $grid_type: $grid_type, $grid_align: $grid_align, $grid_context: $grid_context, $border_color: $border_color, $border_place: $border_place) { @if $grid_type == 12 { $col_width: 80 - $col_gutter; @include the_grid($col_count, $col_width, $grid_uom, $grid_padding_l, $grid_padding_r, $grid_padding_tb, $grid_border, $grid_child, $col_gutter, $grid_align, $grid_context, $border_color, $border_place); } @else if $grid_type == 16 { $col_width: 60 - $col_gutter; @include the_grid($col_count, $col_width, $grid_uom, $grid_padding_l, $grid_padding_r, $grid_padding_tb, $grid_border, $grid_child, $col_gutter, $grid_align, $grid_context, $border_color, $border_place); } @else if $grid_type == 24 { $col_width: 40 - $col_gutter; @include the_grid($col_count, $col_width, $grid_uom, $grid_padding_l, $grid_padding_r, $grid_padding_tb, $grid_border, $grid_child, $col_gutter, $grid_align, $grid_context, $border_color, $border_place); } } /////////// main content dusplay box ////////////// // ----------------------------------------------- @mixin full_width_block($main_col_count, $main_grid_align: center, $main_grid_uom: percent) { $col_count: $main_col_count + 0.25; // additional value compensates for not having 10px margin @include grid($col_count, $grid_align: $main_grid_align, $grid_uom: $main_grid_uom); } ///////// prefix value accounts for a full column in the grid //////////// // ----------------------------------------------------------------------- @mixin prefix($grid_type, $col_count, $grid_uom: $grid_uom, $move: prefix) { @include ppps ($grid_type, $col_count, $grid_uom, $move); } ///////// suffix value accounts for a full column in the grid //////////// // ----------------------------------------------------------------------- @mixin suffix($grid_type, $col_count, $grid_uom: $grid_uom, $move: suffix) { @include ppps ($grid_type, $col_count, $grid_uom, $move); } ///////// push value accounts for a full column in the grid //////////// // ----------------------------------------------------------------------- @mixin push($grid_type, $col_count, $grid_uom: $grid_uom, $move: push) { @include ppps ($grid_type, $col_count, $grid_uom, $move); position: relative; } ///////// pull value accounts for a full column in the grid //////////// // ----------------------------------------------------------------------- @mixin pull($grid_type, $col_count, $grid_uom: $grid_uom, $move: pull) { @include ppps ($grid_type, $col_count, $grid_uom, $move); position: relative; } /////////// `Grid >> Children (Alpha ~ First, Omega ~ Last) /////////// // -------------------------------------------------------------------- @mixin alpha() { margin-left: 0; } @mixin omega() { margin-right: 0; }