/* The Grid ---------------------- */ .row { width: $rowWidth; max-width: 100%; min-width: $screenSmall; margin: 0 auto; .row { width: auto; max-width: none; min-width: 0; margin: 0 (-($columnGutter/2)); } &.collapse { .column, .columns { padding: 0; } } .row { width: auto; max-width: none; min-width: 0; margin: 0 (-($columnGutter/2)); &.collapse { margin: 0; } } } .column, .columns { float: left; min-height: 1px; padding: 0 ($columnGutter/2); position: relative; &.centered { float: none; margin: 0 auto; } } [class*="column"] + [class*="column"]:last-child { float: right; } [class*="column"] + [class*="column"].end { float: left; } // Creating column classes @for $i from 1 through $totalColumns { .#{convert-number-to-word($i)} { width: gridCalc($i, $totalColumns); } } // Creating .row-# classes @for $i from 1 through $totalColumns { .row { .#{convert-number-to-word($i)} { @extend .#{convert-number-to-word($i)}; } } } // Creating .row .offset-by-# classes @for $i from 1 through $totalColumns - 2 { .row { .offset-by-#{convert-number-to-word($i)} { margin-left: gridCalc($i, $totalColumns); } } } // Creating .row .push-# classes @for $i from 2 through $totalColumns - 2 { .push-#{convert-number-to-word($i)} { left: gridCalc($i, $totalColumns); } .pull-#{convert-number-to-word($i)} { right: gridCalc($i, $totalColumns); } } img, object, embed { max-width: 100%; height: auto; } object, embed { height: 100%; } img { -ms-interpolation-mode: bicubic; } #map_canvas img, .map_canvas img {max-width: none!important;} /* Nicolas Gallagher's micro clearfix */ .row { @include clearfix(); } /* Mobile Grid and Overrides ---------------------- */ @media only screen and (max-width: $screenSmall - 1) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } .row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; } .column, .columns { width: auto !important; float: none; } .column:last-child, .columns:last-child { float: none; } [class*="column"] + [class*="column"]:last-child { float: none; } .column:before, .columns:before, .column:after, .columns:after { content:""; display:table; } .column:after, .columns:after { clear: both; } // Placeholder classes for mobile grid overrides %no-left-margin { margin-left: 0 !important; } %left-auto { left: auto; } %right-auto { right: auto; } @for $i from 1 through $totalColumns - 2 { .offset-by-#{convert-number-to-word($i)} { @extend %no-left-margin; } } @for $i from 2 through $totalColumns - 2 { .push-#{convert-number-to-word($i)} { @extend %left-auto; } .pull-#{convert-number-to-word($i)} { @extend %right-auto; } } /* Mobile 4-column Grid */ @for $i from 1 through $mobileTotalColumns { .row { .mobile-#{convert-number-to-word($i)} { width: gridCalc($i, $mobileTotalColumns) !important; float: left; padding: 0 ($columnGutter/2); &:last-child { float: right; } } &.collapse { .mobile-#{convert-number-to-word($i)} { padding: 0; } } } } @for $i from 1 through $mobileTotalColumns - 1 { .push-#{convert-number-to-word($i)}-mobile { left: gridCalc($i, $mobileTotalColumns); } .pull-#{convert-number-to-word($i)}-mobile { right: gridCalc($i, $mobileTotalColumns); } } } /* Block Grids ---------------------- */ /* These are 2-up, 3-up, 4-up and 5-up ULs, suited for repeating blocks of content. Add 'mobile' to them to switch them just like the layout grid (one item per line) on phones For IE7/8 compatibility block-grid items need to be the same height. You can optionally uncomment the lines below to support arbitrary height, but know that IE7/8 do not support :nth-child. -------------------------------------------------- */ .block-grid { display: block; overflow: hidden; padding: 0; &>li { display: block; height: auto; float: left; } &.one-up { margin: 0; &>li { width: 100%; padding: 0 0 15px; } } &.two-up { margin: 0 -15px; &>li { width: 50%; padding: 0 15px 15px; &:nth-child(2n+1) { clear: both; } } } &.three-up { margin: 0 -12px; &>li { width: 33.33%; padding: 0 12px 12px; &:nth-child(3n+1) { clear: both; } } } &.four-up { margin: 0 -10px; &>li { width: 25%; padding: 0 10px 10px; &:nth-child(4n+1) { clear: both; } } } &.five-up { margin: 0 -8px; &>li { width: 20%; padding: 0 8px 8px; &:nth-child(5n+1) { clear: both; } } } } /* Mobile Block Grids */ @media only screen and (max-width: $screenSmall - 1) { .block-grid.mobile { margin-left: 0; &>li { float: none; width: 100%; margin-left: 0; } } }