From: Marcus Schwab Date: Mon, 11 Jun 2012 08:51:19 +0000 (-0700) Subject: Proper spacing between offsets X-Git-Tag: v2.1.0~2^2~252^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd19b42c15108b3c60407924a1725473660120d9;p=thirdparty%2Fbootstrap.git 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". --- 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) {