diff options
| author | Mark Otto <[email protected]> | 2012-06-20 20:20:22 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-06-20 20:20:22 -0700 |
| commit | 7301931a6d4b298fc267d7f74e437f615b652627 (patch) | |
| tree | 56ec06c2c9bb6b914c4ac00f1d47533fbc92503e | |
| parent | f5a2d82a3a106298e1b41a42f3108f3b7b3d81c8 (diff) | |
| parent | 97cbefa72f4b60dc72077f61a03b44a0d4f9b960 (diff) | |
| download | bootstrap-7301931a6d4b298fc267d7f74e437f615b652627.tar.xz bootstrap-7301931a6d4b298fc267d7f74e437f615b652627.zip | |
Merge branch '2.1.0-wip' of https://github.com/marcusds/bootstrap into 2.1.0-wip
| -rw-r--r-- | less/mixins.less | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/less/mixins.less b/less/mixins.less index 1b3bbda8a..1b00cd034 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -634,6 +634,23 @@ } .spanX (0) {} + .offsetX (@index) when (@index > 0) { + (~'.offset@{index}') { .offset(@index); } + (~'.offset@{index}:first-child') { .offsetFirstChild(@index); } + .offsetX(@index - 1); + } + .offsetX (0) {} + + .offset (@columns) { + margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth*2); + *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + (@fluidGridGutterWidth*2) - (.5 / @gridRowWidth * 100 * 1%); + } + + .offsetFirstChild (@columns) { + margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth); + *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%); + } + .span (@columns) { width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%); @@ -652,8 +669,9 @@ margin-left: 0; } - // generate .spanX + // generate .spanX and .offsetX .spanX (@gridColumns); + .offsetX (@gridColumns); } } |
