From 6f8cbc22be560dad7811e8f1e509b6aed3ca1c6c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 21 Jun 2015 23:19:24 -0700 Subject: [PATCH] Upgrade to Bootstrap 3.3.5 --- src/UI/Content/Bootstrap/.csscomb.json | 304 ++++++++++++++++++ src/UI/Content/Bootstrap/.csslintrc | 19 ++ src/UI/Content/Bootstrap/badges.less | 2 +- src/UI/Content/Bootstrap/bootstrap.less | 6 + src/UI/Content/Bootstrap/button-groups.less | 5 +- src/UI/Content/Bootstrap/buttons.less | 16 +- src/UI/Content/Bootstrap/carousel.less | 4 +- src/UI/Content/Bootstrap/dropdowns.less | 4 +- src/UI/Content/Bootstrap/forms.less | 55 +++- src/UI/Content/Bootstrap/input-groups.less | 1 + src/UI/Content/Bootstrap/jumbotron.less | 8 +- src/UI/Content/Bootstrap/list-group.less | 12 +- src/UI/Content/Bootstrap/media.less | 5 + src/UI/Content/Bootstrap/mixins.less | 1 + .../Bootstrap/mixins/background-variant.less | 3 +- src/UI/Content/Bootstrap/mixins/buttons.less | 20 +- .../Bootstrap/mixins/grid-framework.less | 4 +- src/UI/Content/Bootstrap/mixins/grid.less | 4 +- .../Content/Bootstrap/mixins/hide-text.less | 2 +- .../Content/Bootstrap/mixins/list-group.less | 3 +- .../Content/Bootstrap/mixins/pagination.less | 3 +- .../Content/Bootstrap/mixins/reset-text.less | 18 ++ .../mixins/responsive-visibility.less | 2 +- .../Bootstrap/mixins/text-emphasis.less | 3 +- src/UI/Content/Bootstrap/normalize.less | 19 +- src/UI/Content/Bootstrap/pagination.less | 5 +- src/UI/Content/Bootstrap/panels.less | 6 + src/UI/Content/Bootstrap/popovers.less | 12 +- src/UI/Content/Bootstrap/print.less | 6 - src/UI/Content/Bootstrap/scaffolding.less | 3 +- src/UI/Content/Bootstrap/theme.less | 28 +- src/UI/Content/Bootstrap/tooltip.less | 9 +- src/UI/Content/Bootstrap/variables.less | 8 +- src/UI/JsLibraries/bootstrap.js | 240 ++++++++------ 34 files changed, 663 insertions(+), 177 deletions(-) create mode 100644 src/UI/Content/Bootstrap/.csscomb.json create mode 100644 src/UI/Content/Bootstrap/.csslintrc create mode 100644 src/UI/Content/Bootstrap/mixins/reset-text.less diff --git a/src/UI/Content/Bootstrap/.csscomb.json b/src/UI/Content/Bootstrap/.csscomb.json new file mode 100644 index 000000000..40695a478 --- /dev/null +++ b/src/UI/Content/Bootstrap/.csscomb.json @@ -0,0 +1,304 @@ +{ + "always-semicolon": true, + "block-indent": 2, + "color-case": "lower", + "color-shorthand": true, + "element-case": "lower", + "eof-newline": true, + "leading-zero": false, + "remove-empty-rulesets": true, + "space-after-colon": 1, + "space-after-combinator": 1, + "space-before-selector-delimiter": 0, + "space-between-declarations": "\n", + "space-after-opening-brace": "\n", + "space-before-closing-brace": "\n", + "space-before-colon": 0, + "space-before-combinator": 1, + "space-before-opening-brace": 1, + "strip-spaces": true, + "unitless-zero": true, + "vendor-prefix-align": true, + "sort-order": [ + [ + "position", + "top", + "right", + "bottom", + "left", + "z-index", + "display", + "float", + "width", + "min-width", + "max-width", + "height", + "min-height", + "max-height", + "-webkit-box-sizing", + "-moz-box-sizing", + "box-sizing", + "-webkit-appearance", + "padding", + "padding-top", + "padding-right", + "padding-bottom", + "padding-left", + "margin", + "margin-top", + "margin-right", + "margin-bottom", + "margin-left", + "overflow", + "overflow-x", + "overflow-y", + "-webkit-overflow-scrolling", + "-ms-overflow-x", + "-ms-overflow-y", + "-ms-overflow-style", + "clip", + "clear", + "font", + "font-family", + "font-size", + "font-style", + "font-weight", + "font-variant", + "font-size-adjust", + "font-stretch", + "font-effect", + "font-emphasize", + "font-emphasize-position", + "font-emphasize-style", + "font-smooth", + "-webkit-hyphens", + "-moz-hyphens", + "hyphens", + "line-height", + "color", + "text-align", + "-webkit-text-align-last", + "-moz-text-align-last", + "-ms-text-align-last", + "text-align-last", + "text-emphasis", + "text-emphasis-color", + "text-emphasis-style", + "text-emphasis-position", + "text-decoration", + "text-indent", + "text-justify", + "text-outline", + "-ms-text-overflow", + "text-overflow", + "text-overflow-ellipsis", + "text-overflow-mode", + "text-shadow", + "text-transform", + "text-wrap", + "-webkit-text-size-adjust", + "-ms-text-size-adjust", + "letter-spacing", + "-ms-word-break", + "word-break", + "word-spacing", + "-ms-word-wrap", + "word-wrap", + "-moz-tab-size", + "-o-tab-size", + "tab-size", + "white-space", + "vertical-align", + "list-style", + "list-style-position", + "list-style-type", + "list-style-image", + "pointer-events", + "-ms-touch-action", + "touch-action", + "cursor", + "visibility", + "zoom", + "flex-direction", + "flex-order", + "flex-pack", + "flex-align", + "table-layout", + "empty-cells", + "caption-side", + "border-spacing", + "border-collapse", + "content", + "quotes", + "counter-reset", + "counter-increment", + "resize", + "-webkit-user-select", + "-moz-user-select", + "-ms-user-select", + "-o-user-select", + "user-select", + "nav-index", + "nav-up", + "nav-right", + "nav-down", + "nav-left", + "background", + "background-color", + "background-image", + "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient", + "filter:progid:DXImageTransform.Microsoft.gradient", + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader", + "filter", + "background-repeat", + "background-attachment", + "background-position", + "background-position-x", + "background-position-y", + "-webkit-background-clip", + "-moz-background-clip", + "background-clip", + "background-origin", + "-webkit-background-size", + "-moz-background-size", + "-o-background-size", + "background-size", + "border", + "border-color", + "border-style", + "border-width", + "border-top", + "border-top-color", + "border-top-style", + "border-top-width", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-bottom", + "border-bottom-color", + "border-bottom-style", + "border-bottom-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-top-left-radius", + "border-top-right-radius", + "border-bottom-right-radius", + "border-bottom-left-radius", + "-webkit-border-image", + "-moz-border-image", + "-o-border-image", + "border-image", + "-webkit-border-image-source", + "-moz-border-image-source", + "-o-border-image-source", + "border-image-source", + "-webkit-border-image-slice", + "-moz-border-image-slice", + "-o-border-image-slice", + "border-image-slice", + "-webkit-border-image-width", + "-moz-border-image-width", + "-o-border-image-width", + "border-image-width", + "-webkit-border-image-outset", + "-moz-border-image-outset", + "-o-border-image-outset", + "border-image-outset", + "-webkit-border-image-repeat", + "-moz-border-image-repeat", + "-o-border-image-repeat", + "border-image-repeat", + "outline", + "outline-width", + "outline-style", + "outline-color", + "outline-offset", + "-webkit-box-shadow", + "-moz-box-shadow", + "box-shadow", + "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity", + "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha", + "opacity", + "-ms-interpolation-mode", + "-webkit-transition", + "-moz-transition", + "-ms-transition", + "-o-transition", + "transition", + "-webkit-transition-delay", + "-moz-transition-delay", + "-ms-transition-delay", + "-o-transition-delay", + "transition-delay", + "-webkit-transition-timing-function", + "-moz-transition-timing-function", + "-ms-transition-timing-function", + "-o-transition-timing-function", + "transition-timing-function", + "-webkit-transition-duration", + "-moz-transition-duration", + "-ms-transition-duration", + "-o-transition-duration", + "transition-duration", + "-webkit-transition-property", + "-moz-transition-property", + "-ms-transition-property", + "-o-transition-property", + "transition-property", + "-webkit-transform", + "-moz-transform", + "-ms-transform", + "-o-transform", + "transform", + "-webkit-transform-origin", + "-moz-transform-origin", + "-ms-transform-origin", + "-o-transform-origin", + "transform-origin", + "-webkit-animation", + "-moz-animation", + "-ms-animation", + "-o-animation", + "animation", + "-webkit-animation-name", + "-moz-animation-name", + "-ms-animation-name", + "-o-animation-name", + "animation-name", + "-webkit-animation-duration", + "-moz-animation-duration", + "-ms-animation-duration", + "-o-animation-duration", + "animation-duration", + "-webkit-animation-play-state", + "-moz-animation-play-state", + "-ms-animation-play-state", + "-o-animation-play-state", + "animation-play-state", + "-webkit-animation-timing-function", + "-moz-animation-timing-function", + "-ms-animation-timing-function", + "-o-animation-timing-function", + "animation-timing-function", + "-webkit-animation-delay", + "-moz-animation-delay", + "-ms-animation-delay", + "-o-animation-delay", + "animation-delay", + "-webkit-animation-iteration-count", + "-moz-animation-iteration-count", + "-ms-animation-iteration-count", + "-o-animation-iteration-count", + "animation-iteration-count", + "-webkit-animation-direction", + "-moz-animation-direction", + "-ms-animation-direction", + "-o-animation-direction", + "animation-direction" + ] + ] +} diff --git a/src/UI/Content/Bootstrap/.csslintrc b/src/UI/Content/Bootstrap/.csslintrc new file mode 100644 index 000000000..005b86236 --- /dev/null +++ b/src/UI/Content/Bootstrap/.csslintrc @@ -0,0 +1,19 @@ +{ + "adjoining-classes": false, + "box-sizing": false, + "box-model": false, + "compatible-vendor-prefixes": false, + "floats": false, + "font-sizes": false, + "gradients": false, + "important": false, + "known-properties": false, + "outline-none": false, + "qualified-headings": false, + "regex-selectors": false, + "shorthand": false, + "text-indent": false, + "unique-headings": false, + "universal-selector": false, + "unqualified-attributes": false +} diff --git a/src/UI/Content/Bootstrap/badges.less b/src/UI/Content/Bootstrap/badges.less index c70bb939e..6ee16dca4 100644 --- a/src/UI/Content/Bootstrap/badges.less +++ b/src/UI/Content/Bootstrap/badges.less @@ -12,7 +12,7 @@ font-weight: @badge-font-weight; color: @badge-color; line-height: @badge-line-height; - vertical-align: baseline; + vertical-align: middle; white-space: nowrap; text-align: center; background-color: @badge-bg; diff --git a/src/UI/Content/Bootstrap/bootstrap.less b/src/UI/Content/Bootstrap/bootstrap.less index 61b77474f..4b9916e6c 100644 --- a/src/UI/Content/Bootstrap/bootstrap.less +++ b/src/UI/Content/Bootstrap/bootstrap.less @@ -1,3 +1,9 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + // Core variables and mixins @import "variables.less"; @import "mixins.less"; diff --git a/src/UI/Content/Bootstrap/button-groups.less b/src/UI/Content/Bootstrap/button-groups.less index 13c1800de..6a0c5a865 100644 --- a/src/UI/Content/Bootstrap/button-groups.less +++ b/src/UI/Content/Bootstrap/button-groups.less @@ -36,6 +36,7 @@ margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); + .btn, .btn-group, .input-group { float: left; @@ -172,11 +173,11 @@ border-radius: 0; } &:first-child:not(:last-child) { - border-top-right-radius: @border-radius-base; + border-top-right-radius: @btn-border-radius-base; .border-bottom-radius(0); } &:last-child:not(:first-child) { - border-bottom-left-radius: @border-radius-base; + border-bottom-left-radius: @btn-border-radius-base; .border-top-radius(0); } } diff --git a/src/UI/Content/Bootstrap/buttons.less b/src/UI/Content/Bootstrap/buttons.less index 5a746049e..9cbb8f416 100644 --- a/src/UI/Content/Bootstrap/buttons.less +++ b/src/UI/Content/Bootstrap/buttons.less @@ -17,7 +17,7 @@ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid transparent; white-space: nowrap; - .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); + .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base); .user-select(none); &, @@ -47,10 +47,16 @@ &[disabled], fieldset[disabled] & { cursor: @cursor-disabled; - pointer-events: none; // Future-proof disabling of clicks .opacity(.65); .box-shadow(none); } + + a& { + &.disabled, + fieldset[disabled] & { + pointer-events: none; // Future-proof disabling of clicks on `` elements + } + } } @@ -126,14 +132,14 @@ .btn-lg { // line-height: ensure even-numbered height of button next to large input - .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); + .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large); } .btn-sm { // line-height: ensure proper height of button next to small input - .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); + .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small); } .btn-xs { - .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); + .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small); } diff --git a/src/UI/Content/Bootstrap/carousel.less b/src/UI/Content/Bootstrap/carousel.less index 4bbe946d3..87ed6961d 100644 --- a/src/UI/Content/Bootstrap/carousel.less +++ b/src/UI/Content/Bootstrap/carousel.less @@ -29,7 +29,7 @@ @media all and (transform-3d), (-webkit-transform-3d) { .transition-transform(~'0.6s ease-in-out'); .backface-visibility(~'hidden'); - .perspective(1000); + .perspective(1000px); &.next, &.active.right { @@ -130,6 +130,7 @@ .glyphicon-chevron-right { position: absolute; top: 50%; + margin-top: -10px; z-index: 5; display: inline-block; } @@ -147,7 +148,6 @@ .icon-next { width: 20px; height: 20px; - margin-top: -10px; line-height: 1; font-family: serif; } diff --git a/src/UI/Content/Bootstrap/dropdowns.less b/src/UI/Content/Bootstrap/dropdowns.less index af344607b..f6876c1a9 100644 --- a/src/UI/Content/Bootstrap/dropdowns.less +++ b/src/UI/Content/Bootstrap/dropdowns.less @@ -11,6 +11,7 @@ margin-left: 2px; vertical-align: middle; border-top: @caret-width-base dashed; + border-top: @caret-width-base solid ~"\9"; // IE8 border-right: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent; } @@ -184,7 +185,8 @@ // Reverse the caret .caret { border-top: 0; - border-bottom: @caret-width-base solid; + border-bottom: @caret-width-base dashed; + border-bottom: @caret-width-base solid ~"\9"; // IE8 content: ""; } // Different positioning for bottom up menu diff --git a/src/UI/Content/Bootstrap/forms.less b/src/UI/Content/Bootstrap/forms.less index e4b50629e..b064ede46 100644 --- a/src/UI/Content/Bootstrap/forms.less +++ b/src/UI/Content/Bootstrap/forms.less @@ -56,7 +56,6 @@ input[type="checkbox"] { line-height: normal; } -// Set the height of file controls to match text inputs input[type="file"] { display: block; } @@ -175,13 +174,17 @@ input[type="search"] { // text within the input to become vertically misaligned. As a workaround, we // set a pixel line-height that matches the given height of the input, but only // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 +// +// Note that as of 8.3, iOS doesn't support `datetime` or `week`. @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { - line-height: @input-height-base; + &.form-control { + line-height: @input-height-base; + } &.input-sm, .input-group-sm & { @@ -322,14 +325,26 @@ input[type="checkbox"] { } .form-group-sm { .form-control { - .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small); - } - .form-control-static { height: @input-height-small; padding: @padding-small-vertical @padding-small-horizontal; font-size: @font-size-small; line-height: @line-height-small; + border-radius: @input-border-radius-small; + } + select.form-control { + height: @input-height-small; + line-height: @input-height-small; + } + textarea.form-control, + select[multiple].form-control { + height: auto; + } + .form-control-static { + height: @input-height-small; min-height: (@line-height-computed + @font-size-small); + padding: (@padding-small-vertical + 1) @padding-small-horizontal; + font-size: @font-size-small; + line-height: @line-height-small; } } @@ -338,14 +353,26 @@ input[type="checkbox"] { } .form-group-lg { .form-control { - .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large); - } - .form-control-static { height: @input-height-large; padding: @padding-large-vertical @padding-large-horizontal; font-size: @font-size-large; line-height: @line-height-large; + border-radius: @input-border-radius-large; + } + select.form-control { + height: @input-height-large; + line-height: @input-height-large; + } + textarea.form-control, + select[multiple].form-control { + height: auto; + } + .form-control-static { + height: @input-height-large; min-height: (@line-height-computed + @font-size-large); + padding: (@padding-large-vertical + 1) @padding-large-horizontal; + font-size: @font-size-large; + line-height: @line-height-large; } } @@ -376,12 +403,16 @@ input[type="checkbox"] { text-align: center; pointer-events: none; } -.input-lg + .form-control-feedback { +.input-lg + .form-control-feedback, +.input-group-lg + .form-control-feedback, +.form-group-lg .form-control + .form-control-feedback { width: @input-height-large; height: @input-height-large; line-height: @input-height-large; } -.input-sm + .form-control-feedback { +.input-sm + .form-control-feedback, +.input-group-sm + .form-control-feedback, +.form-group-sm .form-control + .form-control-feedback { width: @input-height-small; height: @input-height-small; line-height: @input-height-small; @@ -550,7 +581,7 @@ input[type="checkbox"] { // 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 { - right: (@grid-gutter-width / 2); + right: floor((@grid-gutter-width / 2)); } // Form group sizes @@ -561,6 +592,7 @@ input[type="checkbox"] { @media (min-width: @screen-sm-min) { .control-label { padding-top: ((@padding-large-vertical * @line-height-large) + 1); + font-size: @font-size-large; } } } @@ -568,6 +600,7 @@ input[type="checkbox"] { @media (min-width: @screen-sm-min) { .control-label { padding-top: (@padding-small-vertical + 1); + font-size: @font-size-small; } } } diff --git a/src/UI/Content/Bootstrap/input-groups.less b/src/UI/Content/Bootstrap/input-groups.less index a8712f25b..457ea60ba 100644 --- a/src/UI/Content/Bootstrap/input-groups.less +++ b/src/UI/Content/Bootstrap/input-groups.less @@ -160,6 +160,7 @@ &:last-child { > .btn, > .btn-group { + z-index: 2; margin-left: -1px; } } diff --git a/src/UI/Content/Bootstrap/jumbotron.less b/src/UI/Content/Bootstrap/jumbotron.less index 93036d3c9..fa80a38c6 100644 --- a/src/UI/Content/Bootstrap/jumbotron.less +++ b/src/UI/Content/Bootstrap/jumbotron.less @@ -4,7 +4,8 @@ .jumbotron { - padding: @jumbotron-padding (@jumbotron-padding / 2); + padding-top: @jumbotron-padding; + padding-bottom: @jumbotron-padding; margin-bottom: @jumbotron-padding; color: @jumbotron-color; background-color: @jumbotron-bg; @@ -34,7 +35,8 @@ } @media screen and (min-width: @screen-sm-min) { - padding: (@jumbotron-padding * 1.6) 0; + padding-top: (@jumbotron-padding * 1.6); + padding-bottom: (@jumbotron-padding * 1.6); .container &, .container-fluid & { @@ -44,7 +46,7 @@ h1, .h1 { - font-size: (@font-size-base * 4.5); + font-size: @jumbotron-heading-font-size; } } } diff --git a/src/UI/Content/Bootstrap/list-group.less b/src/UI/Content/Bootstrap/list-group.less index 1462ce16b..216b91230 100644 --- a/src/UI/Content/Bootstrap/list-group.less +++ b/src/UI/Content/Bootstrap/list-group.less @@ -38,12 +38,13 @@ } -// Linked list items +// Interactive list items // -// Use anchor elements instead of `li`s or `div`s to create linked list items. +// Use anchor or button elements instead of `li`s or `div`s to create interactive items. // Includes an extra `.active` modifier class for showing selected items. -a.list-group-item { +a.list-group-item, +button.list-group-item { color: @list-group-link-color; .list-group-item-heading { @@ -59,6 +60,11 @@ a.list-group-item { } } +button.list-group-item { + width: 100%; + text-align: left; +} + .list-group-item { // Disabled state &.disabled, diff --git a/src/UI/Content/Bootstrap/media.less b/src/UI/Content/Bootstrap/media.less index a6bf78192..8c835e861 100644 --- a/src/UI/Content/Bootstrap/media.less +++ b/src/UI/Content/Bootstrap/media.less @@ -19,6 +19,11 @@ .media-object { display: block; + + // Fix collapse in webkit from max-width: 100% and display: table-cell. + &.img-thumbnail { + max-width: none; + } } .media-right, diff --git a/src/UI/Content/Bootstrap/mixins.less b/src/UI/Content/Bootstrap/mixins.less index af4408fc2..e6f9fe684 100644 --- a/src/UI/Content/Bootstrap/mixins.less +++ b/src/UI/Content/Bootstrap/mixins.less @@ -11,6 +11,7 @@ @import "mixins/responsive-visibility.less"; @import "mixins/size.less"; @import "mixins/tab-focus.less"; +@import "mixins/reset-text.less"; @import "mixins/text-emphasis.less"; @import "mixins/text-overflow.less"; @import "mixins/vendor-prefixes.less"; diff --git a/src/UI/Content/Bootstrap/mixins/background-variant.less b/src/UI/Content/Bootstrap/mixins/background-variant.less index 556e490d4..a85c22b74 100644 --- a/src/UI/Content/Bootstrap/mixins/background-variant.less +++ b/src/UI/Content/Bootstrap/mixins/background-variant.less @@ -2,7 +2,8 @@ .bg-variant(@color) { background-color: @color; - a&:hover { + a&:hover, + a&:focus { background-color: darken(@color, 10%); } } diff --git a/src/UI/Content/Bootstrap/mixins/buttons.less b/src/UI/Content/Bootstrap/mixins/buttons.less index 92d8a056c..6875a97c8 100644 --- a/src/UI/Content/Bootstrap/mixins/buttons.less +++ b/src/UI/Content/Bootstrap/mixins/buttons.less @@ -8,15 +8,31 @@ background-color: @background; border-color: @border; - &:hover, &:focus, - &.focus, + &.focus { + color: @color; + background-color: darken(@background, 10%); + border-color: darken(@border, 25%); + } + &:hover { + color: @color; + background-color: darken(@background, 10%); + border-color: darken(@border, 12%); + } &:active, &.active, .open > .dropdown-toggle& { color: @color; background-color: darken(@background, 10%); border-color: darken(@border, 12%); + + &:hover, + &:focus, + &.focus { + color: @color; + background-color: darken(@background, 17%); + border-color: darken(@border, 25%); + } } &:active, &.active, diff --git a/src/UI/Content/Bootstrap/mixins/grid-framework.less b/src/UI/Content/Bootstrap/mixins/grid-framework.less index f3b3929d6..8c23eed24 100644 --- a/src/UI/Content/Bootstrap/mixins/grid-framework.less +++ b/src/UI/Content/Bootstrap/mixins/grid-framework.less @@ -19,8 +19,8 @@ // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding - padding-left: (@grid-gutter-width / 2); - padding-right: (@grid-gutter-width / 2); + padding-left: ceil((@grid-gutter-width / 2)); + padding-right: floor((@grid-gutter-width / 2)); } } .col(1); // kickstart it diff --git a/src/UI/Content/Bootstrap/mixins/grid.less b/src/UI/Content/Bootstrap/mixins/grid.less index cae5eaff9..f144c15f4 100644 --- a/src/UI/Content/Bootstrap/mixins/grid.less +++ b/src/UI/Content/Bootstrap/mixins/grid.less @@ -13,8 +13,8 @@ // Creates a wrapper for a series of columns .make-row(@gutter: @grid-gutter-width) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); + margin-left: ceil((@gutter / -2)); + margin-right: floor((@gutter / -2)); &:extend(.clearfix all); } diff --git a/src/UI/Content/Bootstrap/mixins/hide-text.less b/src/UI/Content/Bootstrap/mixins/hide-text.less index c2315e572..bc7011850 100644 --- a/src/UI/Content/Bootstrap/mixins/hide-text.less +++ b/src/UI/Content/Bootstrap/mixins/hide-text.less @@ -1,6 +1,6 @@ // CSS image replacement // -// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for +// Heads up! v3 launched with only `.hide-text()`, but per our pattern for // mixins being reused as classes with the same name, this doesn't hold up. As // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. // diff --git a/src/UI/Content/Bootstrap/mixins/list-group.less b/src/UI/Content/Bootstrap/mixins/list-group.less index 8b5b065cb..03aa19069 100644 --- a/src/UI/Content/Bootstrap/mixins/list-group.less +++ b/src/UI/Content/Bootstrap/mixins/list-group.less @@ -5,7 +5,8 @@ color: @color; background-color: @background; - a& { + a&, + button& { color: @color; .list-group-item-heading { diff --git a/src/UI/Content/Bootstrap/mixins/pagination.less b/src/UI/Content/Bootstrap/mixins/pagination.less index 7deb505d2..618804f2d 100644 --- a/src/UI/Content/Bootstrap/mixins/pagination.less +++ b/src/UI/Content/Bootstrap/mixins/pagination.less @@ -1,11 +1,12 @@ // Pagination -.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { +.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { > li { > a, > span { padding: @padding-vertical @padding-horizontal; font-size: @font-size; + line-height: @line-height; } &:first-child { > a, diff --git a/src/UI/Content/Bootstrap/mixins/reset-text.less b/src/UI/Content/Bootstrap/mixins/reset-text.less new file mode 100644 index 000000000..58dd4d19b --- /dev/null +++ b/src/UI/Content/Bootstrap/mixins/reset-text.less @@ -0,0 +1,18 @@ +.reset-text() { + font-family: @font-family-base; + // We deliberately do NOT reset font-size. + font-style: normal; + font-weight: normal; + letter-spacing: normal; + line-break: auto; + line-height: @line-height-base; + text-align: left; // Fallback for where `start` is not supported + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + white-space: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; +} diff --git a/src/UI/Content/Bootstrap/mixins/responsive-visibility.less b/src/UI/Content/Bootstrap/mixins/responsive-visibility.less index f7951c3d7..ecf1e979f 100644 --- a/src/UI/Content/Bootstrap/mixins/responsive-visibility.less +++ b/src/UI/Content/Bootstrap/mixins/responsive-visibility.less @@ -4,7 +4,7 @@ // More easily include all the states for responsive-utilities.less. .responsive-visibility() { display: block !important; - table& { display: table; } + table& { display: table !important; } tr& { display: table-row !important; } th&, td& { display: table-cell !important; } diff --git a/src/UI/Content/Bootstrap/mixins/text-emphasis.less b/src/UI/Content/Bootstrap/mixins/text-emphasis.less index 0868ef9f2..9e8a77a69 100644 --- a/src/UI/Content/Bootstrap/mixins/text-emphasis.less +++ b/src/UI/Content/Bootstrap/mixins/text-emphasis.less @@ -2,7 +2,8 @@ .text-emphasis-variant(@color) { color: @color; - a&:hover { + a&:hover, + a&:focus { color: darken(@color, 10%); } } diff --git a/src/UI/Content/Bootstrap/normalize.less b/src/UI/Content/Bootstrap/normalize.less index 62a085a48..9dddf73ad 100644 --- a/src/UI/Content/Bootstrap/normalize.less +++ b/src/UI/Content/Bootstrap/normalize.less @@ -1,9 +1,9 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ // // 1. Set default font family to sans-serif. -// 2. Prevent iOS text size adjust after orientation change, without disabling -// user zoom. +// 2. Prevent iOS and IE text size adjust after device orientation change, +// without disabling user zoom. // html { @@ -71,7 +71,7 @@ audio:not([controls]) { // // Address `[hidden]` styling not present in IE 8/9/10. -// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. +// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. // [hidden], @@ -91,7 +91,8 @@ a { } // -// Improve readability when focused and also mouse hovered in all browsers. +// Improve readability of focused elements when they are also in an +// active/hover state. // a:active, @@ -209,7 +210,6 @@ figure { // hr { - -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } @@ -350,15 +350,12 @@ input[type="number"]::-webkit-outer-spin-button { // // 1. Address `appearance` set to `searchfield` in Safari and Chrome. -// 2. Address `box-sizing` set to `border-box` in Safari and Chrome -// (include `-moz` to future-proof). +// 2. Address `box-sizing` set to `border-box` in Safari and Chrome. // input[type="search"] { -webkit-appearance: textfield; // 1 - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; // 2 - box-sizing: content-box; + box-sizing: content-box; //2 } // diff --git a/src/UI/Content/Bootstrap/pagination.less b/src/UI/Content/Bootstrap/pagination.less index 38c4c3d34..31a23bf79 100644 --- a/src/UI/Content/Bootstrap/pagination.less +++ b/src/UI/Content/Bootstrap/pagination.less @@ -40,6 +40,7 @@ > li > span { &:hover, &:focus { + z-index: 3; color: @pagination-hover-color; background-color: @pagination-hover-bg; border-color: @pagination-hover-border; @@ -79,10 +80,10 @@ // Large .pagination-lg { - .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); + .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); } // Small .pagination-sm { - .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); + .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } diff --git a/src/UI/Content/Bootstrap/panels.less b/src/UI/Content/Bootstrap/panels.less index 04eb2b39c..425eb5e64 100644 --- a/src/UI/Content/Bootstrap/panels.less +++ b/src/UI/Content/Bootstrap/panels.less @@ -76,6 +76,7 @@ .border-top-radius((@panel-border-radius - 1)); } } + // Add border bottom radius for last one &:last-child { .list-group-item:last-child { @@ -84,6 +85,11 @@ } } } + > .panel-heading + .panel-collapse > .list-group { + .list-group-item:first-child { + .border-top-radius(0); + } + } } // Collapse space between when there's no additional content. .panel-heading + .list-group { diff --git a/src/UI/Content/Bootstrap/popovers.less b/src/UI/Content/Bootstrap/popovers.less index 2748eead1..3a62a6455 100644 --- a/src/UI/Content/Bootstrap/popovers.less +++ b/src/UI/Content/Bootstrap/popovers.less @@ -11,12 +11,11 @@ display: none; max-width: @popover-max-width; padding: 1px; - // Reset font and text properties given new insertion method - font-family: @font-family-base; + // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + .reset-text(); font-size: @font-size-base; - font-weight: normal; - line-height: @line-height-base; - text-align: left; + background-color: @popover-bg; background-clip: padding-box; border: 1px solid @popover-fallback-border-color; @@ -24,9 +23,6 @@ border-radius: @border-radius-large; .box-shadow(0 5px 10px rgba(0,0,0,.2)); - // Overrides for proper insertion - white-space: normal; - // Offset the popover to account for the popover arrow &.top { margin-top: -@popover-arrow-width; } &.right { margin-left: @popover-arrow-width; } diff --git a/src/UI/Content/Bootstrap/print.less b/src/UI/Content/Bootstrap/print.less index 94ca58f12..66e54ab48 100644 --- a/src/UI/Content/Bootstrap/print.less +++ b/src/UI/Content/Bootstrap/print.less @@ -67,12 +67,6 @@ } // Bootstrap specific changes start - // - // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 - // Once fixed, we can just straight up remove this. - select { - background: #fff !important; - } // Bootstrap components .navbar { diff --git a/src/UI/Content/Bootstrap/scaffolding.less b/src/UI/Content/Bootstrap/scaffolding.less index 47b1d5a1a..1929bfc5c 100644 --- a/src/UI/Content/Bootstrap/scaffolding.less +++ b/src/UI/Content/Bootstrap/scaffolding.less @@ -155,8 +155,7 @@ hr { // Fixes "clickability" issue (and more generally, the firing of events such as focus as well) // for traditionally non-focusable elements with role="button" // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile -// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged [role="button"] { cursor: pointer; -} \ No newline at end of file +} diff --git a/src/UI/Content/Bootstrap/theme.less b/src/UI/Content/Bootstrap/theme.less index 6f2eb6212..8371872b0 100644 --- a/src/UI/Content/Bootstrap/theme.less +++ b/src/UI/Content/Bootstrap/theme.less @@ -1,3 +1,8 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ // // Load core variables and mixins @@ -28,6 +33,12 @@ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); } + &.disabled, + &[disabled], + fieldset[disabled] & { + .box-shadow(none); + } + .badge { text-shadow: none; } @@ -53,10 +64,17 @@ } &.disabled, - &:disabled, - &[disabled] { - background-color: darken(@btn-color, 12%); - background-image: none; + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &.focus, + &:active, + &.active { + background-color: darken(@btn-color, 12%); + background-image: none; + } } } @@ -132,7 +150,7 @@ .navbar-inverse { #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg); .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257 - + border-radius: @navbar-border-radius; .navbar-nav > .open > a, .navbar-nav > .active > a { #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%)); diff --git a/src/UI/Content/Bootstrap/tooltip.less b/src/UI/Content/Bootstrap/tooltip.less index 9d5684743..b48d63e07 100644 --- a/src/UI/Content/Bootstrap/tooltip.less +++ b/src/UI/Content/Bootstrap/tooltip.less @@ -8,11 +8,11 @@ position: absolute; z-index: @zindex-tooltip; display: block; - // Reset font and text properties given new insertion method - font-family: @font-family-base; + // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + .reset-text(); font-size: @font-size-small; - font-weight: normal; - line-height: 1.4; + .opacity(0); &.in { .opacity(@tooltip-opacity); } @@ -28,7 +28,6 @@ padding: 3px 8px; color: @tooltip-color; text-align: center; - text-decoration: none; background-color: @tooltip-bg; border-radius: @border-radius-base; } diff --git a/src/UI/Content/Bootstrap/variables.less b/src/UI/Content/Bootstrap/variables.less index b5fb9d02c..c1861a8e0 100644 --- a/src/UI/Content/Bootstrap/variables.less +++ b/src/UI/Content/Bootstrap/variables.less @@ -170,6 +170,11 @@ @btn-link-disabled-color: @gray-light; +// Allows for customizing button radius independently from global border radius +@btn-border-radius-base: @border-radius-base; +@btn-border-radius-large: @border-radius-large; +@btn-border-radius-small: @border-radius-small; + //== Forms // @@ -383,7 +388,7 @@ @navbar-default-toggle-border-color: #ddd; -// Inverted navbar +//=== Inverted navbar // Reset inverted navbar basics @navbar-inverse-color: lighten(@gray-light, 15%); @navbar-inverse-bg: #222; @@ -484,6 +489,7 @@ @jumbotron-bg: @gray-lighter; @jumbotron-heading-color: inherit; @jumbotron-font-size: ceil((@font-size-base * 1.5)); +@jumbotron-heading-font-size: ceil((@font-size-base * 4.5)); //== Form states and alerts diff --git a/src/UI/JsLibraries/bootstrap.js b/src/UI/JsLibraries/bootstrap.js index 1c88b71e8..5debfd7de 100644 --- a/src/UI/JsLibraries/bootstrap.js +++ b/src/UI/JsLibraries/bootstrap.js @@ -1,7 +1,7 @@ /*! - * Bootstrap v3.3.4 (http://getbootstrap.com) + * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Licensed under the MIT license */ if (typeof jQuery === 'undefined') { @@ -17,7 +17,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: transition.js v3.3.4 + * Bootstrap: transition.js v3.3.5 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -77,7 +77,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: alert.js v3.3.4 + * Bootstrap: alert.js v3.3.5 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') { $(el).on('click', dismiss, this.close) } - Alert.VERSION = '3.3.4' + Alert.VERSION = '3.3.5' Alert.TRANSITION_DURATION = 150 @@ -172,7 +172,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: button.js v3.3.4 + * Bootstrap: button.js v3.3.5 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') { this.isLoading = false } - Button.VERSION = '3.3.4' + Button.VERSION = '3.3.5' Button.DEFAULTS = { loadingText: 'loading...' @@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') { var val = $el.is('input') ? 'val' : 'html' var data = $el.data() - state = state + 'Text' + state += 'Text' if (data.resetText == null) $el.data('resetText', $el[val]()) @@ -229,15 +229,19 @@ if (typeof jQuery === 'undefined') { if ($parent.length) { var $input = this.$element.find('input') if ($input.prop('type') == 'radio') { - if ($input.prop('checked') && this.$element.hasClass('active')) changed = false - else $parent.find('.active').removeClass('active') + if ($input.prop('checked')) changed = false + $parent.find('.active').removeClass('active') + this.$element.addClass('active') + } else if ($input.prop('type') == 'checkbox') { + if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false + this.$element.toggleClass('active') } - if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + $input.prop('checked', this.$element.hasClass('active')) + if (changed) $input.trigger('change') } else { this.$element.attr('aria-pressed', !this.$element.hasClass('active')) + this.$element.toggleClass('active') } - - if (changed) this.$element.toggleClass('active') } @@ -280,7 +284,7 @@ if (typeof jQuery === 'undefined') { var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') Plugin.call($btn, 'toggle') - e.preventDefault() + if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() }) .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) @@ -289,7 +293,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: carousel.js v3.3.4 + * Bootstrap: carousel.js v3.3.5 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -320,7 +324,7 @@ if (typeof jQuery === 'undefined') { .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } - Carousel.VERSION = '3.3.4' + Carousel.VERSION = '3.3.5' Carousel.TRANSITION_DURATION = 600 @@ -527,7 +531,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: collapse.js v3.3.4 + * Bootstrap: collapse.js v3.3.5 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -557,7 +561,7 @@ if (typeof jQuery === 'undefined') { if (this.options.toggle) this.toggle() } - Collapse.VERSION = '3.3.4' + Collapse.VERSION = '3.3.5' Collapse.TRANSITION_DURATION = 350 @@ -739,7 +743,7 @@ if (typeof jQuery === 'undefined') { }(jQuery); /* ======================================================================== - * Bootstrap: dropdown.js v3.3.4 + * Bootstrap: dropdown.js v3.3.5 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -759,7 +763,41 @@ if (typeof jQuery === 'undefined') { $(element).on('click.bs.dropdown', this.toggle) } - Dropdown.VERSION = '3.3.4' + Dropdown.VERSION = '3.3.5' + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + function clearMenus(e) { + if (e && e.which === 3) return + $(backdrop).remove() + $(toggle).each(function () { + var $this = $(this) + var $parent = getParent($this) + var relatedTarget = { relatedTarget: this } + + if (!$parent.hasClass('open')) return + + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this.attr('aria-expanded', 'false') + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) + }) + } Dropdown.prototype.toggle = function (e) { var $this = $(this) @@ -774,7 +812,10 @@ if (typeof jQuery === 'undefined') { if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { // if mobile we use a backdrop because click events don't delegate - $('