From: Mark Otto Date: Mon, 12 Mar 2012 05:25:34 +0000 (-0700) Subject: Merge branch 'luk3thomas-popover_arrow_colors' into 2.0.2-wip X-Git-Tag: v2.0.2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a11c526b93731881a4908d120e8231ad73e9cec;p=thirdparty%2Fbootstrap.git Merge branch 'luk3thomas-popover_arrow_colors' into 2.0.2-wip --- 1a11c526b93731881a4908d120e8231ad73e9cec diff --cc less/mixins.less index b01a32b43f,a9ad2bedae..4114bccfe8 --- a/less/mixins.less +++ b/less/mixins.less @@@ -480,135 -585,6 +480,135 @@@ margin-top: -@arrowWidth; border-top: @arrowWidth solid transparent; border-bottom: @arrowWidth solid transparent; - border-right: @arrowWidth solid @black; + border-right: @arrowWidth solid @color; } } + +// Grid System +// ----------- + +// Centered container element +.container-fixed() { + margin-left: auto; + margin-right: auto; + .clearfix(); +} + +// Table columns +.tableColumns(@columnSpan: 1) { + float: none; // undo default grid column styles + width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells + margin-left: 0; // undo default grid column styles +} + +// Make a Grid +// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior +.makeRow() { + margin-left: @gridGutterWidth * -1; + .clearfix(); +} +.makeColumn(@columns: 1) { + float: left; + margin-left: @gridGutterWidth; + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); +} + +// The Grid +#grid { + + .core (@gridColumnWidth, @gridGutterWidth) { + + .spanX (@index) when (@index > 0) { + (~".span@{index}") { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .offsetX (@index) when (@index > 0) { + (~".offset@{index}") { .offset(@index); } + .offsetX(@index - 1); + } + .offsetX (0) {} + + .offset (@columns) { + margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); + } + + .span (@columns) { + width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); + } + + .row { + margin-left: @gridGutterWidth * -1; + .clearfix(); + } + + [class*="span"] { + float: left; + margin-left: @gridGutterWidth; + } + + // Set the container width, and override it for fixed navbars in media queries + .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { .span(@gridColumns); } + + // generate .spanX and .offsetX + .spanX (@gridColumns); + .offsetX (@gridColumns); + + } + + .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) { + + .spanX (@index) when (@index > 0) { + (~"> .span@{index}") { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .span (@columns) { + width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); + } + + .row-fluid { + width: 100%; + .clearfix(); + > [class*="span"] { + float: left; + margin-left: @fluidGridGutterWidth; + } + > [class*="span"]:first-child { + margin-left: 0; + } + + // generate .spanX + .spanX (@gridColumns); + } + + } + + .input(@gridColumnWidth, @gridGutterWidth) { + + .spanX (@index) when (@index > 0) { + (~"input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index}") { .span(@index); } + .spanX(@index - 1); + } + .spanX (0) {} + + .span(@columns) { + width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10; + } + + input, + textarea, + .uneditable-input { + margin-left: 0; // override margin-left from core grid system + } + + // generate .spanX + .spanX (@gridColumns); + + } + +}