mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 14:54:27 +02:00
Merge branch '2.1.0-wip' of https://github.com/marcusds/bootstrap into 2.1.0-wip
This commit is contained in:
@@ -634,6 +634,23 @@
|
|||||||
}
|
}
|
||||||
.spanX (0) {}
|
.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) {
|
.span (@columns) {
|
||||||
width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
|
width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
|
||||||
*width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
|
*width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
|
||||||
@@ -652,8 +669,9 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate .spanX
|
// generate .spanX and .offsetX
|
||||||
.spanX (@gridColumns);
|
.spanX (@gridColumns);
|
||||||
|
.offsetX (@gridColumns);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user