Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMarcus Schwab <marcus1060@gmail.com>2012-06-11 12:51:19 +0400
committerMarcus Schwab <marcus1060@gmail.com>2012-06-11 12:51:19 +0400
commitbd19b42c15108b3c60407924a1725473660120d9 (patch)
tree868402a901bb5e1cddef2e6282f4ce36d3ddb514 /less
parentc3f5d7c62d49de8de9947e84e9186bd2bf374008 (diff)
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".
Diffstat (limited to 'less')
-rw-r--r--[-rwxr-xr-x]less/mixins.less12
1 files changed, 9 insertions, 3 deletions
diff --git a/less/mixins.less b/less/mixins.less
index 8f89beb794..8698ab0e3b 100755..100644
--- 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) {