]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Merge branch 'luk3thomas-popover_arrow_colors' into 2.0.2-wip
authorMark Otto <markotto@twitter.com>
Mon, 12 Mar 2012 05:25:34 +0000 (22:25 -0700)
committerMark Otto <markotto@twitter.com>
Mon, 12 Mar 2012 05:25:34 +0000 (22:25 -0700)
1  2 
less/mixins.less

index b01a32b43fc9aab11c98d45411b86f9dc0415d0e,a9ad2bedae0ef2a21d544cc40a9f4e431051a198..4114bccfe86edfea487c6a8316e965726362146b
      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);
 +
 +  }
 +
 +}