0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Merge branch '2.1.0-wip' of https://github.com/marcusds/bootstrap into marcusds-2.1.0-wip

This commit is contained in:
Mark Otto 2012-06-10 23:02:30 -07:00
commit 681b601561

14
less/mixins.less Normal file → Executable file
View File

@ -596,6 +596,17 @@
}
.spanX (0) {}
.offsetX (@index) when (@index > 0) {
(~'.offset@{index}, .row-fluid .offset@{index}:first-child') { .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);
}
}