From 303ba425d14820c93528555c60b355fcc9e67df8 Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Sun, 2 Feb 2014 22:34:20 -0500 Subject: upgrade bootstrap to 3.1.0 --- bower_components/bootstrap/less/badges.less | 4 + bower_components/bootstrap/less/breadcrumbs.less | 5 +- bower_components/bootstrap/less/button-groups.less | 21 +- bower_components/bootstrap/less/buttons.less | 16 +- bower_components/bootstrap/less/code.less | 10 + bower_components/bootstrap/less/dropdowns.less | 30 +- bower_components/bootstrap/less/forms.less | 120 +++-- bower_components/bootstrap/less/glyphicons.less | 6 +- bower_components/bootstrap/less/grid.less | 31 +- bower_components/bootstrap/less/input-groups.less | 57 ++- bower_components/bootstrap/less/jumbotron.less | 8 +- bower_components/bootstrap/less/list-group.less | 28 +- bower_components/bootstrap/less/mixins.less | 179 ++++++-- bower_components/bootstrap/less/modals.less | 23 +- bower_components/bootstrap/less/navbar.less | 44 +- bower_components/bootstrap/less/navs.less | 4 +- bower_components/bootstrap/less/normalize.less | 261 ++++++----- bower_components/bootstrap/less/pager.less | 10 +- bower_components/bootstrap/less/pagination.less | 9 +- bower_components/bootstrap/less/panels.less | 80 +++- bower_components/bootstrap/less/print.less | 4 - .../bootstrap/less/responsive-utilities.less | 142 +----- bower_components/bootstrap/less/scaffolding.less | 19 +- bower_components/bootstrap/less/tables.less | 4 +- bower_components/bootstrap/less/theme.less | 2 +- bower_components/bootstrap/less/tooltip.less | 2 +- bower_components/bootstrap/less/type.less | 141 +++--- bower_components/bootstrap/less/variables.less | 507 ++++++++++++++------- bower_components/bootstrap/less/wells.less | 2 +- 29 files changed, 1086 insertions(+), 683 deletions(-) (limited to 'bower_components/bootstrap/less') diff --git a/bower_components/bootstrap/less/badges.less b/bower_components/bootstrap/less/badges.less index 166b2be5..56828cab 100644 --- a/bower_components/bootstrap/less/badges.less +++ b/bower_components/bootstrap/less/badges.less @@ -28,6 +28,10 @@ position: relative; top: -1px; } + .btn-xs & { + top: 0; + padding: 1px 5px; + } } // Hover state, but only for links diff --git a/bower_components/bootstrap/less/breadcrumbs.less b/bower_components/bootstrap/less/breadcrumbs.less index 60b33ea7..cb01d503 100644 --- a/bower_components/bootstrap/less/breadcrumbs.less +++ b/bower_components/bootstrap/less/breadcrumbs.less @@ -4,19 +4,22 @@ .breadcrumb { - padding: 8px 15px; + padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; margin-bottom: @line-height-computed; list-style: none; background-color: @breadcrumb-bg; border-radius: @border-radius-base; + > li { display: inline-block; + + li:before { content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space padding: 0 5px; color: @breadcrumb-color; } } + > .active { color: @breadcrumb-active-color; } diff --git a/bower_components/bootstrap/less/button-groups.less b/bower_components/bootstrap/less/button-groups.less index 05fda149..58fd9067 100644 --- a/bower_components/bootstrap/less/button-groups.less +++ b/bower_components/bootstrap/less/button-groups.less @@ -37,18 +37,17 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { - .clearfix(); + margin-left: -5px; // Offset the first child's margin + &:extend(.clearfix all); - .btn-group { + .btn-group, + .input-group { float: left; } - // Space out series of button groups > .btn, - > .btn-group { - + .btn, - + .btn-group { - margin-left: 5px; - } + > .btn-group, + > .input-group { + margin-left: 5px; } } @@ -157,7 +156,7 @@ // Clear floats so dropdown menus can be properly placed > .btn-group { - .clearfix(); + &:extend(.clearfix all); > .btn { float: none; } @@ -188,13 +187,13 @@ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group-vertical > .btn-group:first-child { +.btn-group-vertical > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { .border-bottom-radius(0); } } -.btn-group-vertical > .btn-group:last-child > .btn:first-child { +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { .border-top-radius(0); } diff --git a/bower_components/bootstrap/less/buttons.less b/bower_components/bootstrap/less/buttons.less index 62e693be..4858a8ae 100644 --- a/bower_components/bootstrap/less/buttons.less +++ b/bower_components/bootstrap/less/buttons.less @@ -56,14 +56,6 @@ .btn-primary { .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); } -// Warning appears as orange -.btn-warning { - .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); -} -// Danger and error appear as red -.btn-danger { - .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); -} // Success appears as green .btn-success { .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); @@ -72,6 +64,14 @@ .btn-info { .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); } +// Warning appears as orange +.btn-warning { + .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); +} +// Danger and error appear as red +.btn-danger { + .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); +} // Link buttons diff --git a/bower_components/bootstrap/less/code.less b/bower_components/bootstrap/less/code.less index 44e9e893..3eed26c0 100644 --- a/bower_components/bootstrap/less/code.less +++ b/bower_components/bootstrap/less/code.less @@ -21,6 +21,16 @@ code { border-radius: @border-radius-base; } +// User input typically entered via keyboard +kbd { + padding: 2px 4px; + font-size: 90%; + color: @kbd-color; + background-color: @kbd-bg; + border-radius: @border-radius-small; + box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); +} + // Blocks of code pre { display: block; diff --git a/bower_components/bootstrap/less/dropdowns.less b/bower_components/bootstrap/less/dropdowns.less index 1a8f1973..f165165e 100644 --- a/bower_components/bootstrap/less/dropdowns.less +++ b/bower_components/bootstrap/less/dropdowns.less @@ -46,6 +46,8 @@ background-clip: padding-box; // Aligns the dropdown menu to right + // + // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` &.pull-right { right: 0; left: auto; @@ -126,6 +128,25 @@ } } +// Menu positioning +// +// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown +// menu with the parent. +.dropdown-menu-right { + left: auto; // Reset the default from `.dropdown-menu` + right: 0; +} +// With v3, we enabled auto-flipping if you have a dropdown within a right +// aligned nav component. To enable the undoing of that, we provide an override +// to restore the default dropdown menu alignment. +// +// This is only for left-aligning a dropdown menu within a `.navbar-right` or +// `.pull-right` nav component. +.dropdown-menu-left { + left: 0; + right: auto; +} + // Dropdown section headers .dropdown-header { display: block; @@ -142,7 +163,7 @@ right: 0; bottom: 0; top: 0; - z-index: @zindex-dropdown - 10; + z-index: (@zindex-dropdown - 10); } // Right aligned dropdowns @@ -180,7 +201,12 @@ @media (min-width: @grid-float-breakpoint) { .navbar-right { .dropdown-menu { - .pull-right > .dropdown-menu(); + .dropdown-menu-right(); + } + // Necessary for overrides of the default right aligned menu. + // Will remove come v4 in all likelihood. + .dropdown-menu-left { + .dropdown-menu-left(); } } } diff --git a/bower_components/bootstrap/less/forms.less b/bower_components/bootstrap/less/forms.less index dc425ecc..d0189d0c 100644 --- a/bower_components/bootstrap/less/forms.less +++ b/bower_components/bootstrap/less/forms.less @@ -11,6 +11,10 @@ fieldset { padding: 0; margin: 0; border: 0; + // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets, + // so we reset that to ensure it behaves more like a standard block element. + // See https://github.com/twbs/bootstrap/issues/12359. + min-width: 0; } legend { @@ -33,6 +37,10 @@ label { // Normalize form controls +// +// While most of our form styles require extra classes, some basic normalization +// is required to ensure optimum display with or without those classes to better +// address browser inconsistencies. // Override content-box in Normalize (* isn't specific enough) input[type="search"] { @@ -47,41 +55,30 @@ input[type="checkbox"] { line-height: normal; } -// Set the height of select and file controls to match text inputs +// Set the height of file controls to match text inputs input[type="file"] { display: block; } +// Make range inputs behave like textual form controls +input[type="range"] { + display: block; + width: 100%; +} + // Make multiple select elements height not fixed select[multiple], select[size] { height: auto; } -// Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611 -select optgroup { - font-size: inherit; - font-style: inherit; - font-family: inherit; -} - -// Focus for select, file, radio, and checkbox +// Focus for file, radio, and checkbox input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { .tab-focus(); } -// Fix for Chrome number input -// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button. -// See https://github.com/twbs/bootstrap/issues/8350 for more. -input[type="number"] { - &::-webkit-outer-spin-button, - &::-webkit-inner-spin-button { - height: auto; - } -} - // Adjust output element output { display: block; @@ -89,7 +86,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; } @@ -123,7 +119,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; background-color: @input-bg; background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid @input-border; @@ -135,9 +130,6 @@ output { .form-control-focus(); // Placeholder - // - // Placeholder text gets special styles because when browsers invalidate entire - // lines if it doesn't understand a selector/ .placeholder(); // Disabled and read-only inputs @@ -149,6 +141,7 @@ output { fieldset[disabled] & { cursor: not-allowed; background-color: @input-bg-disabled; + opacity: 1; // iOS fix for unreadable disabled content } // Reset height for `textarea`s @@ -157,6 +150,14 @@ output { } } +// Special styles for iOS date input +// +// In Mobile Safari, date inputs require a pixel line-height that matches the +// given height of the input. +input[type="date"] { + line-height: @input-height-base; +} + // Form groups // @@ -179,10 +180,8 @@ output { margin-top: 10px; margin-bottom: 10px; padding-left: 20px; - vertical-align: middle; label { display: inline; - margin-bottom: 0; font-weight: normal; cursor: pointer; } @@ -230,7 +229,12 @@ input[type="checkbox"], } } + // Form control sizing +// +// Build on `.form-control` with modifier classes to decrease or increase the +// height and font-size of form controls. + .input-sm { .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } @@ -244,18 +248,38 @@ input[type="checkbox"], // // Apply contextual and semantic states to individual form controls. -// Warning +.has-feedback { + // Enable absolute positioning + position: relative; + + // Ensure icons don't overlap text + .form-control { + padding-right: (@input-height-base * 1.25); + } + + // Feedback icon (requires .glyphicon classes) + .form-control-feedback { + position: absolute; + top: (@line-height-computed + 5); // Height of the `label` and its margin + right: 0; + display: block; + width: @input-height-base; + height: @input-height-base; + line-height: @input-height-base; + text-align: center; + } +} + +// Feedback states +.has-success { + .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); +} .has-warning { .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); } -// Error .has-error { .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); } -// Success -.has-success { - .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); -} // Static form control text @@ -296,9 +320,9 @@ input[type="checkbox"], .form-inline { // Kick in the inline - @media (min-width: @screen-sm) { + @media (min-width: @screen-sm-min) { // Inline-block all the things for "inline" - .form-group { + .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; @@ -307,11 +331,13 @@ input[type="checkbox"], // In navbar-form, allow folks to *not* use `.form-group` .form-control { display: inline-block; + width: auto; // Prevent labels from stacking above inputs in `.form-group` + vertical-align: middle; } - // Override `width: 100%;` when not within a `.form-group` - select.form-control { - width: auto; + .control-label { + margin-bottom: 0; + vertical-align: middle; } // Remove default margin on radios/checkboxes that were used for stacking, and @@ -323,12 +349,21 @@ input[type="checkbox"], margin-top: 0; margin-bottom: 0; padding-left: 0; + vertical-align: middle; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: none; margin-left: 0; } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + } } } @@ -354,7 +389,7 @@ input[type="checkbox"], // and other content below items .radio, .checkbox { - min-height: @line-height-computed + (@padding-base-vertical + 1); + min-height: (@line-height-computed + (@padding-base-vertical + 1)); } // Make form groups behave like rows @@ -372,4 +407,13 @@ input[type="checkbox"], text-align: right; } } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + right: (@grid-gutter-width / 2); + } } diff --git a/bower_components/bootstrap/less/glyphicons.less b/bower_components/bootstrap/less/glyphicons.less index 8a68f11e..789c5e7f 100644 --- a/bower_components/bootstrap/less/glyphicons.less +++ b/bower_components/bootstrap/less/glyphicons.less @@ -14,7 +14,7 @@ src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')", ~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')", ~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')", - ~"url('@{icon-font-path}@{icon-font-name}.svg#glyphicons-halflingsregular') format('svg')"; + ~"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')"; } // Catchall baseclass @@ -28,10 +28,6 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - - &:empty { - width: 1em; - } } // Individual icons diff --git a/bower_components/bootstrap/less/grid.less b/bower_components/bootstrap/less/grid.less index 279d8036..88957f42 100644 --- a/bower_components/bootstrap/less/grid.less +++ b/bower_components/bootstrap/less/grid.less @@ -2,14 +2,18 @@ // Grid system // -------------------------------------------------- -// Set the container width, and override it for fixed navbars in media queries + +// Container widths +// +// Set the container width, and override it for fixed navbars in media queries. + .container { .container-fixed(); - @media (min-width: @screen-sm) { + @media (min-width: @screen-sm-min) { width: @container-sm; } - @media (min-width: @screen-md) { + @media (min-width: @screen-md-min) { width: @container-md; } @media (min-width: @screen-lg-min) { @@ -17,12 +21,30 @@ } } -// mobile first defaults + +// Fluid container +// +// Utilizes the mixin meant for fixed width containers, but without any defined +// width for fluid, full width layouts. + +.container-fluid { + .container-fixed(); +} + + +// Row +// +// Rows contain and clear the floats of your columns. + .row { .make-row(); } + +// Columns +// // Common styles for small and large grid columns + .make-grid-columns(); @@ -76,4 +98,3 @@ .make-grid(@grid-columns, lg, push); .make-grid(@grid-columns, lg, offset); } - diff --git a/bower_components/bootstrap/less/input-groups.less b/bower_components/bootstrap/less/input-groups.less index d19c4c64..b486cf4d 100644 --- a/bower_components/bootstrap/less/input-groups.less +++ b/bower_components/bootstrap/less/input-groups.less @@ -17,6 +17,11 @@ } .form-control { + // IE9 fubars the placeholder attribute in text inputs and the arrows on + // select elements in input groups. To fix it, we float the input. Details: + // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 + float: left; + width: 100%; margin-bottom: 0; } @@ -90,8 +95,10 @@ .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { .border-right-radius(0); } .input-group-addon:first-child { @@ -100,8 +107,10 @@ .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { .border-left-radius(0); } .input-group-addon:last-child { @@ -112,25 +121,37 @@ // ------------------------- .input-group-btn { position: relative; + // Jankily prevent input button groups from wrapping with `white-space` and + // `font-size` in combination with `inline-block` on buttons. + font-size: 0; white-space: nowrap; - // Negative margin to only have a 1px border between the two - &:first-child > .btn { - margin-right: -1px; + // Negative margin for spacing, position for bringing hovered/focused/actived + // element above the siblings. + > .btn { + position: relative; + + .btn { + margin-left: -1px; + } + // Bring the "active" button to the front + &:hover, + &:focus, + &:active { + z-index: 2; + } } - &:last-child > .btn { - margin-left: -1px; - } -} -.input-group-btn > .btn { - position: relative; - // Jankily prevent input button groups from wrapping - + .btn { - margin-left: -4px; + + // Negative margin to only have a 1px border between the two + &:first-child { + > .btn, + > .btn-group { + margin-right: -1px; + } } - // Bring the "active" button to the front - &:hover, - &:active { - z-index: 2; + &:last-child { + > .btn, + > .btn-group { + margin-left: -1px; + } } } diff --git a/bower_components/bootstrap/less/jumbotron.less b/bower_components/bootstrap/less/jumbotron.less index 0460b69d..a15e1697 100644 --- a/bower_components/bootstrap/less/jumbotron.less +++ b/bower_components/bootstrap/less/jumbotron.less @@ -6,19 +6,17 @@ .jumbotron { padding: @jumbotron-padding; margin-bottom: @jumbotron-padding; - font-size: @jumbotron-font-size; - font-weight: 200; - line-height: (@line-height-base * 1.5); color: @jumbotron-color; background-color: @jumbotron-bg; h1, .h1 { - line-height: 1; color: @jumbotron-heading-color; } p { - line-height: 1.4; + margin-bottom: (@jumbotron-padding / 2); + font-size: @jumbotron-font-size; + font-weight: 200; } .container & { diff --git a/bower_components/bootstrap/less/list-group.less b/bower_components/bootstrap/less/list-group.less index 2cee5297..3343f8e5 100644 --- a/bower_components/bootstrap/less/list-group.less +++ b/bower_components/bootstrap/less/list-group.less @@ -2,17 +2,21 @@ // List groups // -------------------------------------------------- + // Base class // // Easily usable on