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:
authorMark Otto <markotto@twitter.com>2012-06-21 07:20:22 +0400
committerMark Otto <markotto@twitter.com>2012-06-21 07:20:22 +0400
commit7301931a6d4b298fc267d7f74e437f615b652627 (patch)
tree56ec06c2c9bb6b914c4ac00f1d47533fbc92503e /less
parentf5a2d82a3a106298e1b41a42f3108f3b7b3d81c8 (diff)
parent97cbefa72f4b60dc72077f61a03b44a0d4f9b960 (diff)
Merge branch '2.1.0-wip' of https://github.com/marcusds/bootstrap into 2.1.0-wip
Diffstat (limited to 'less')
-rw-r--r--less/mixins.less20
1 files changed, 19 insertions, 1 deletions
diff --git a/less/mixins.less b/less/mixins.less
index 1b3bbda8af..1b00cd0348 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);
}
}