Forked from dustinsmith1024/bootstrap-fluid-grid-mixin.css
Created
July 25, 2013 16:57
-
-
Save grafikchaos/6081700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.fluid-row { | |
div, section, article, li { /* Needs testing on li's */ | |
&:first-child { /* using first child and margin-left for IE support */ | |
margin-left: 0; | |
} | |
} | |
} | |
.fluid-column(@columns: 1, @offset: 0, @reset: default) { | |
.input-block-level(); | |
float: left; | |
width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); | |
*width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%); | |
margin-left: (@fluidGridGutterWidth * @offset) + (@fluidGridGutterWidth * (@offset - 1)) + (@fluidGridGutterWidth * 2); | |
*margin-left: @fluidGridGutterWidth - (.5 / @fluidGridGutterWidth * 100 * 1%); | |
.fluid-column-reset(@reset); | |
} | |
.fluid-column-reset(default) { | |
@media (max-width: 1024px) { | |
float: none; | |
width: 100%; | |
*width: 100%; | |
margin-left: 0; | |
*margin-left: 0; | |
} | |
} | |
.fluid-column-reset(none) { | |
} | |
.fluid-column-reset(@_) { | |
@media (max-width: @_) { | |
float: none; | |
width: 100%; | |
*width: 100%; | |
margin-left: 0; | |
*margin-left: 0; | |
} | |
} | |
.component-row { | |
.fluid-row(); | |
.clearfix(); | |
} | |
.one-component { | |
.fluid-column(8); | |
} | |
.two-component { | |
.fluid-column(4); | |
} | |
.three-component { | |
.fluid-column(7); | |
} | |
.four-component { | |
.fluid-column(4, 2); | |
} | |
#main-content { | |
.fluid-row(); | |
.clearfix(); | |
} | |
.main-content-sidebar { | |
.fluid-column(3, 0, 700px); | |
} | |
.main-content { | |
.fluid-column(9, 0, 700px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment