From bd19b42c15108b3c60407924a1725473660120d9 Mon Sep 17 00:00:00 2001 From: Marcus Schwab Date: Mon, 11 Jun 2012 01:51:19 -0700 Subject: [PATCH] Proper spacing between offsets row-fluids don't have the same negative margin-left as rows. This was throwing everything off. So added a different rule for first-child and subsequent "spans". --- less/mixins.less | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) mode change 100755 => 100644 less/mixins.less diff --git a/less/mixins.less b/less/mixins.less old mode 100755 new mode 100644 index 8f89beb794..8698ab0e3b --- a/less/mixins.less +++ b/less/mixins.less @@ -597,14 +597,20 @@ .spanX (0) {} .offsetX (@index) when (@index > 0) { - (~'.offset@{index}, .row-fluid .offset@{index}:first-child') { .offset(@index); } + (~'.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; - *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%); + 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) {