From f8d68002dc22a15a84c0a4dff5a5851ff131c9c8 Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Wed, 9 May 2012 15:50:13 +0200 Subject: [PATCH] Added offsets for .row-fluid --- less/mixins.less | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/less/mixins.less b/less/mixins.less index 4f204d1af7..47353bcc55 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -596,6 +596,17 @@ } .spanX (0) {} + .offsetX (@index) when (@index > 0) { + (~'.offset@{index}, .row-fluid > .offset@{index}[class*="span"]') { .offset(@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%); + } + .span (@columns) { width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%); @@ -614,8 +625,9 @@ margin-left: 0; } - // generate .spanX + // generate .spanX and .offsetX .spanX (@gridColumns); + .offsetX (@gridColumns); } }