diff --git a/Gemfile b/Gemfile index 6e2ae00..fc335d6 100644 --- a/Gemfile +++ b/Gemfile @@ -30,6 +30,7 @@ gem 'rack-contrib' # asset pipeline gem 'uglifier', '>= 1.0.3' gem 'sass-rails' +gem 'sass', '~> 3.1.19' group :production do gem 'dalli', '~> 2.7.0' diff --git a/plugins/responsive/public/_bootstrap-compass.scss b/plugins/responsive/public/_bootstrap-compass.scss new file mode 100644 index 0000000..8fbc3cd --- /dev/null +++ b/plugins/responsive/public/_bootstrap-compass.scss @@ -0,0 +1,9 @@ +@function twbs-font-path($path) { + @return font-url($path, true); +} + +@function twbs-image-path($path) { + @return image-url($path, true); +} + +$bootstrap-sass-asset-helper: true; diff --git a/plugins/responsive/public/_bootstrap-mincer.scss b/plugins/responsive/public/_bootstrap-mincer.scss new file mode 100644 index 0000000..0c4655e --- /dev/null +++ b/plugins/responsive/public/_bootstrap-mincer.scss @@ -0,0 +1,19 @@ +// Mincer asset helper functions +// +// This must be imported into a .css.ejs.scss file. +// Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation. + + +@function twbs-font-path($path) { + // do something like following + // from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>" + // from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>" + // or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>" + @return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>"; +} + +@function twbs-image-path($file) { + @return "<%- asset_path("#{$file}") %>"; +} + +$bootstrap-sass-asset-helper: true; diff --git a/plugins/responsive/public/_bootstrap-sprockets.scss b/plugins/responsive/public/_bootstrap-sprockets.scss index 7d30692..9fffc1e 100644 --- a/plugins/responsive/public/_bootstrap-sprockets.scss +++ b/plugins/responsive/public/_bootstrap-sprockets.scss @@ -5,3 +5,5 @@ @function twbs-image-path($path) { @return image-path($path); } + +$bootstrap-sass-asset-helper: true; diff --git a/plugins/responsive/public/_bootstrap.scss b/plugins/responsive/public/_bootstrap.scss new file mode 100644 index 0000000..598b007 --- /dev/null +++ b/plugins/responsive/public/_bootstrap.scss @@ -0,0 +1,56 @@ +/*! + * 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 "bootstrap/variables"; +@import "bootstrap/mixins"; + +// Reset and dependencies +@import "bootstrap/normalize"; +@import "bootstrap/print"; +@import "bootstrap/glyphicons"; + +// Core CSS +@import "bootstrap/scaffolding"; +@import "bootstrap/type"; +@import "bootstrap/code"; +@import "bootstrap/grid"; +@import "bootstrap/tables"; +@import "bootstrap/forms"; +@import "bootstrap/buttons"; + +// Components +@import "bootstrap/component-animations"; +@import "bootstrap/dropdowns"; +@import "bootstrap/button-groups"; +@import "bootstrap/input-groups"; +@import "bootstrap/navs"; +@import "bootstrap/navbar"; +@import "bootstrap/breadcrumbs"; +@import "bootstrap/pagination"; +@import "bootstrap/pager"; +@import "bootstrap/labels"; +@import "bootstrap/badges"; +@import "bootstrap/jumbotron"; +@import "bootstrap/thumbnails"; +@import "bootstrap/alerts"; +@import "bootstrap/progress-bars"; +@import "bootstrap/media"; +@import "bootstrap/list-group"; +@import "bootstrap/panels"; +@import "bootstrap/responsive-embed"; +@import "bootstrap/wells"; +@import "bootstrap/close"; + +// Components w/ JavaScript +@import "bootstrap/modals"; +@import "bootstrap/tooltip"; +@import "bootstrap/popovers"; +@import "bootstrap/carousel"; + +// Utility classes +@import "bootstrap/utilities"; +@import "bootstrap/responsive-utilities"; diff --git a/plugins/responsive/public/bootstrap/_alerts.scss b/plugins/responsive/public/bootstrap/_alerts.scss index e45de83..7d1e1fd 100644 --- a/plugins/responsive/public/bootstrap/_alerts.scss +++ b/plugins/responsive/public/bootstrap/_alerts.scss @@ -18,6 +18,7 @@ // Specified for the h4 to prevent conflicts of changing $headings-color color: inherit; } + // Provide class for links that match alerts .alert-link { font-weight: $alert-link-font-weight; @@ -28,6 +29,7 @@ > ul { margin-bottom: 0; } + > p + p { margin-top: 5px; } @@ -57,12 +59,15 @@ .alert-success { @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text); } + .alert-info { @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text); } + .alert-warning { @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text); } + .alert-danger { @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); } diff --git a/plugins/responsive/public/bootstrap/_badges.scss b/plugins/responsive/public/bootstrap/_badges.scss index c913f14..70002e0 100644 --- a/plugins/responsive/public/bootstrap/_badges.scss +++ b/plugins/responsive/public/bootstrap/_badges.scss @@ -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; @@ -28,7 +28,9 @@ position: relative; top: -1px; } - .btn-xs & { + + .btn-xs &, + .btn-group-xs > .btn & { top: 0; padding: 1px 5px; } @@ -41,12 +43,15 @@ color: $badge-active-color; background-color: $badge-active-bg; } + .list-group-item > & { float: right; } + .list-group-item > & + & { margin-right: 5px; } + .nav-pills > li > a > & { margin-left: 3px; } diff --git a/plugins/responsive/public/bootstrap/_breadcrumbs.scss b/plugins/responsive/public/bootstrap/_breadcrumbs.scss index 3641e33..b61f0c7 100644 --- a/plugins/responsive/public/bootstrap/_breadcrumbs.scss +++ b/plugins/responsive/public/bootstrap/_breadcrumbs.scss @@ -14,7 +14,9 @@ display: inline-block; + li:before { - content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space + // [converter] Workaround for https://github.com/sass/libsass/issues/1115 + $nbsp: "\00a0"; + content: "#{$breadcrumb-separator}#{$nbsp}"; // Unicode space added since inline-block means non-collapsing white-space padding: 0 5px; color: $breadcrumb-color; } diff --git a/plugins/responsive/public/bootstrap/_button-groups.scss b/plugins/responsive/public/bootstrap/_button-groups.scss index e761daa..43d235c 100644 --- a/plugins/responsive/public/bootstrap/_button-groups.scss +++ b/plugins/responsive/public/bootstrap/_button-groups.scss @@ -36,6 +36,7 @@ margin-left: -5px; // Offset the first child's margin @include clearfix; + .btn, .btn-group, .input-group { float: left; @@ -71,13 +72,13 @@ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group > .btn-group:first-child { +.btn-group > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { @include border-right-radius(0); } } -.btn-group > .btn-group:last-child > .btn:first-child { +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { @include border-left-radius(0); } @@ -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; @include border-bottom-radius(0); } &:last-child:not(:first-child) { - border-bottom-left-radius: $border-radius-base; + border-bottom-left-radius: $btn-border-radius-base; @include border-top-radius(0); } } diff --git a/plugins/responsive/public/bootstrap/_buttons.scss b/plugins/responsive/public/bootstrap/_buttons.scss index 37bf259..6452b70 100644 --- a/plugins/responsive/public/bootstrap/_buttons.scss +++ b/plugins/responsive/public/bootstrap/_buttons.scss @@ -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; - @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $border-radius-base); + @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base); @include user-select(none); &, @@ -47,10 +47,18 @@ &[disabled], fieldset[disabled] & { cursor: $cursor-disabled; - pointer-events: none; // Future-proof disabling of clicks @include opacity(.65); @include box-shadow(none); } + + // [converter] extracted a& to a.btn +} + +a.btn { + &.disabled, + fieldset[disabled] & { + pointer-events: none; // Future-proof disabling of clicks on `` elements + } } @@ -107,7 +115,7 @@ &:hover, &:focus { color: $link-hover-color; - text-decoration: underline; + text-decoration: $link-hover-decoration; background-color: transparent; } &[disabled], @@ -126,14 +134,14 @@ .btn-lg { // line-height: ensure even-numbered height of button next to large input - @include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large); + @include 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 - @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small); + @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small); } .btn-xs { - @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $border-radius-small); + @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small); } diff --git a/plugins/responsive/public/bootstrap/_carousel.scss b/plugins/responsive/public/bootstrap/_carousel.scss index 49db83f..f700678 100644 --- a/plugins/responsive/public/bootstrap/_carousel.scss +++ b/plugins/responsive/public/bootstrap/_carousel.scss @@ -27,24 +27,24 @@ // WebKit CSS3 transforms for supported devices @media all and (transform-3d), (-webkit-transform-3d) { - transition: transform .6s ease-in-out; - backface-visibility: hidden; - perspective: 1000; + @include transition-transform(0.6s ease-in-out); + @include backface-visibility(hidden); + @include perspective(1000px); &.next, &.active.right { - transform: translate3d(100%, 0, 0); + @include translate3d(100%, 0, 0); left: 0; } &.prev, &.active.left { - transform: translate3d(-100%, 0, 0); + @include translate3d(-100%, 0, 0); left: 0; } &.next.left, &.prev.right, &.active { - transform: translate3d(0, 0, 0); + @include translate3d(0, 0, 0); left: 0; } } @@ -130,6 +130,7 @@ .glyphicon-chevron-right { position: absolute; top: 50%; + margin-top: -10px; z-index: 5; display: inline-block; } @@ -147,7 +148,7 @@ .icon-next { width: 20px; height: 20px; - margin-top: -10px; + line-height: 1; font-family: serif; } @@ -195,6 +196,7 @@ // Internet Explorer 8-9 does not support clicks on elements without a set // `background-color`. We cannot use `filter` since that's not viewed as a // background color by the browser. Thus, a hack is needed. + // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer // // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we // set alpha transparency for the best results possible. diff --git a/plugins/responsive/public/bootstrap/_close.scss b/plugins/responsive/public/bootstrap/_close.scss index 62ce30f..3b74d8a 100644 --- a/plugins/responsive/public/bootstrap/_close.scss +++ b/plugins/responsive/public/bootstrap/_close.scss @@ -26,6 +26,7 @@ // Additional properties for button version // iOS requires the button element instead of an anchor tag. // If you want the anchor version, it requires `href="#"`. +// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile button.close { padding: 0; cursor: pointer; diff --git a/plugins/responsive/public/bootstrap/_component-animations.scss b/plugins/responsive/public/bootstrap/_component-animations.scss index 1f76b8c..ca3b43c 100644 --- a/plugins/responsive/public/bootstrap/_component-animations.scss +++ b/plugins/responsive/public/bootstrap/_component-animations.scss @@ -17,9 +17,8 @@ .collapse { display: none; - visibility: hidden; - &.in { display: block; visibility: visible; } + &.in { display: block; } // [converter] extracted tr&.in to tr.collapse.in // [converter] extracted tbody&.in to tbody.collapse.in } diff --git a/plugins/responsive/public/bootstrap/_dropdowns.scss b/plugins/responsive/public/bootstrap/_dropdowns.scss index c7256e1..aac8459 100644 --- a/plugins/responsive/public/bootstrap/_dropdowns.scss +++ b/plugins/responsive/public/bootstrap/_dropdowns.scss @@ -10,12 +10,14 @@ height: 0; margin-left: 2px; vertical-align: middle; - border-top: $caret-width-base solid; + 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; } // The dropdown wrapper (div) +.dropup, .dropdown { position: relative; } @@ -183,14 +185,15 @@ // 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 .dropdown-menu { top: auto; bottom: 100%; - margin-bottom: 1px; + margin-bottom: 2px; } } diff --git a/plugins/responsive/public/bootstrap/_forms.scss b/plugins/responsive/public/bootstrap/_forms.scss index 439657c..de4befd 100644 --- a/plugins/responsive/public/bootstrap/_forms.scss +++ b/plugins/responsive/public/bootstrap/_forms.scss @@ -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; } @@ -123,7 +122,7 @@ output { 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; - border-radius: $input-border-radius; + border-radius: $input-border-radius; // Note: This has no effect on s in CSS. @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s); @@ -141,9 +140,13 @@ output { &[disabled], &[readonly], fieldset[disabled] & { - cursor: $cursor-disabled; background-color: $input-bg-disabled; - opacity: 1; // iOS fix for unreadable disabled content + opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655 + } + + &[disabled], + fieldset[disabled] & { + cursor: $cursor-disabled; } // [converter] extracted textarea& to textarea.form-control @@ -172,26 +175,28 @@ input[type="search"] { // In Mobile Safari, setting `display: block` on temporal inputs causes the // 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. +// 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; - } - input[type="date"].input-sm, - input[type="time"].input-sm, - input[type="datetime-local"].input-sm, - input[type="month"].input-sm { - line-height: $input-height-small; - } - input[type="date"].input-lg, - input[type="time"].input-lg, - input[type="datetime-local"].input-lg, - input[type="month"].input-lg { - line-height: $input-height-large; + &.form-control { + line-height: $input-height-base; + } + + &.input-sm, + .input-group-sm & { + line-height: $input-height-small; + } + + &.input-lg, + .input-group-lg & { + line-height: $input-height-large; + } } } @@ -202,7 +207,7 @@ input[type="search"] { // horizontal forms, use the predefined grid classes. .form-group { - margin-bottom: 15px; + margin-bottom: $form-group-margin-bottom; } @@ -242,6 +247,7 @@ input[type="search"] { // Radios and checkboxes on same line .radio-inline, .checkbox-inline { + position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; @@ -298,6 +304,7 @@ input[type="checkbox"] { padding-bottom: ($padding-base-vertical + 1); // Remove default margin from `p` margin-bottom: 0; + min-height: ($line-height-computed + $font-size-base); &.input-lg, &.input-sm { @@ -311,10 +318,61 @@ input[type="checkbox"] { // // Build on `.form-control` with modifier classes to decrease or increase the // height and font-size of form controls. +// +// The `.form-group-* form-control` variations are sadly duplicated to avoid the +// issue documented in https://github.com/twbs/bootstrap/issues/15074. -@include input-size('.input-sm, .form-group-sm .form-control', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small); +@include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small); +.form-group-sm { + .form-control { + 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; + } +} -@include input-size('.input-lg, .form-group-lg .form-control', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large); +@include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large); +.form-group-lg { + .form-control { + 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; + } +} // Form control feedback states @@ -343,12 +401,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; @@ -447,8 +509,7 @@ input[type="checkbox"] { } // Remove default margin on radios/checkboxes that were used for stacking, and - // then undo the floating of radios and checkboxes to match (which also avoids - // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). + // then undo the floating of radios and checkboxes to match. .radio, .checkbox { display: inline-block; @@ -524,7 +585,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 @@ -535,6 +596,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; } } } @@ -542,6 +604,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/plugins/responsive/public/bootstrap/_glyphicons.scss b/plugins/responsive/public/bootstrap/_glyphicons.scss index 5486eaa..385340b 100644 --- a/plugins/responsive/public/bootstrap/_glyphicons.scss +++ b/plugins/responsive/public/bootstrap/_glyphicons.scss @@ -7,14 +7,17 @@ // // Star -// Import the fonts -@font-face { - font-family: 'Glyphicons Halflings'; - src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot')); - src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), '#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'), - url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), '#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'), - url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), '#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'), - url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'), '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) format('svg'); +@at-root { + // Import the fonts + @font-face { + font-family: 'Glyphicons Halflings'; + src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot')); + src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), '#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'), + url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff2'), '#{$icon-font-path}#{$icon-font-name}.woff2')) format('woff2'), + url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), '#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'), + url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), '#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'), + url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'), '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) format('svg'); + } } // Catchall baseclass @@ -232,3 +235,73 @@ .glyphicon-cloud-upload { &:before { content: "\e198"; } } .glyphicon-tree-conifer { &:before { content: "\e199"; } } .glyphicon-tree-deciduous { &:before { content: "\e200"; } } +.glyphicon-cd { &:before { content: "\e201"; } } +.glyphicon-save-file { &:before { content: "\e202"; } } +.glyphicon-open-file { &:before { content: "\e203"; } } +.glyphicon-level-up { &:before { content: "\e204"; } } +.glyphicon-copy { &:before { content: "\e205"; } } +.glyphicon-paste { &:before { content: "\e206"; } } +// The following 2 Glyphicons are omitted for the time being because +// they currently use Unicode codepoints that are outside the +// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle +// non-BMP codepoints in CSS string escapes, and thus can't display these two icons. +// Notably, the bug affects some older versions of the Android Browser. +// More info: https://github.com/twbs/bootstrap/issues/10106 +// .glyphicon-door { &:before { content: "\1f6aa"; } } +// .glyphicon-key { &:before { content: "\1f511"; } } +.glyphicon-alert { &:before { content: "\e209"; } } +.glyphicon-equalizer { &:before { content: "\e210"; } } +.glyphicon-king { &:before { content: "\e211"; } } +.glyphicon-queen { &:before { content: "\e212"; } } +.glyphicon-pawn { &:before { content: "\e213"; } } +.glyphicon-bishop { &:before { content: "\e214"; } } +.glyphicon-knight { &:before { content: "\e215"; } } +.glyphicon-baby-formula { &:before { content: "\e216"; } } +.glyphicon-tent { &:before { content: "\26fa"; } } +.glyphicon-blackboard { &:before { content: "\e218"; } } +.glyphicon-bed { &:before { content: "\e219"; } } +.glyphicon-apple { &:before { content: "\f8ff"; } } +.glyphicon-erase { &:before { content: "\e221"; } } +.glyphicon-hourglass { &:before { content: "\231b"; } } +.glyphicon-lamp { &:before { content: "\e223"; } } +.glyphicon-duplicate { &:before { content: "\e224"; } } +.glyphicon-piggy-bank { &:before { content: "\e225"; } } +.glyphicon-scissors { &:before { content: "\e226"; } } +.glyphicon-bitcoin { &:before { content: "\e227"; } } +.glyphicon-btc { &:before { content: "\e227"; } } +.glyphicon-xbt { &:before { content: "\e227"; } } +.glyphicon-yen { &:before { content: "\00a5"; } } +.glyphicon-jpy { &:before { content: "\00a5"; } } +.glyphicon-ruble { &:before { content: "\20bd"; } } +.glyphicon-rub { &:before { content: "\20bd"; } } +.glyphicon-scale { &:before { content: "\e230"; } } +.glyphicon-ice-lolly { &:before { content: "\e231"; } } +.glyphicon-ice-lolly-tasted { &:before { content: "\e232"; } } +.glyphicon-education { &:before { content: "\e233"; } } +.glyphicon-option-horizontal { &:before { content: "\e234"; } } +.glyphicon-option-vertical { &:before { content: "\e235"; } } +.glyphicon-menu-hamburger { &:before { content: "\e236"; } } +.glyphicon-modal-window { &:before { content: "\e237"; } } +.glyphicon-oil { &:before { content: "\e238"; } } +.glyphicon-grain { &:before { content: "\e239"; } } +.glyphicon-sunglasses { &:before { content: "\e240"; } } +.glyphicon-text-size { &:before { content: "\e241"; } } +.glyphicon-text-color { &:before { content: "\e242"; } } +.glyphicon-text-background { &:before { content: "\e243"; } } +.glyphicon-object-align-top { &:before { content: "\e244"; } } +.glyphicon-object-align-bottom { &:before { content: "\e245"; } } +.glyphicon-object-align-horizontal{ &:before { content: "\e246"; } } +.glyphicon-object-align-left { &:before { content: "\e247"; } } +.glyphicon-object-align-vertical { &:before { content: "\e248"; } } +.glyphicon-object-align-right { &:before { content: "\e249"; } } +.glyphicon-triangle-right { &:before { content: "\e250"; } } +.glyphicon-triangle-left { &:before { content: "\e251"; } } +.glyphicon-triangle-bottom { &:before { content: "\e252"; } } +.glyphicon-triangle-top { &:before { content: "\e253"; } } +.glyphicon-console { &:before { content: "\e254"; } } +.glyphicon-superscript { &:before { content: "\e255"; } } +.glyphicon-subscript { &:before { content: "\e256"; } } +.glyphicon-menu-left { &:before { content: "\e257"; } } +.glyphicon-menu-right { &:before { content: "\e258"; } } +.glyphicon-menu-down { &:before { content: "\e259"; } } +.glyphicon-menu-up { &:before { content: "\e260"; } } diff --git a/plugins/responsive/public/bootstrap/_input-groups.scss b/plugins/responsive/public/bootstrap/_input-groups.scss index ae0e921..12f0c42 100644 --- a/plugins/responsive/public/bootstrap/_input-groups.scss +++ b/plugins/responsive/public/bootstrap/_input-groups.scss @@ -160,6 +160,7 @@ &:last-child { > .btn, > .btn-group { + z-index: 2; margin-left: -1px; } } diff --git a/plugins/responsive/public/bootstrap/_jumbotron.scss b/plugins/responsive/public/bootstrap/_jumbotron.scss index ed4c6c9..439d23d 100644 --- a/plugins/responsive/public/bootstrap/_jumbotron.scss +++ b/plugins/responsive/public/bootstrap/_jumbotron.scss @@ -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; @@ -13,6 +14,7 @@ .h1 { color: $jumbotron-heading-color; } + p { margin-bottom: ($jumbotron-padding / 2); font-size: $jumbotron-font-size; @@ -33,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 & { @@ -43,7 +46,7 @@ h1, .h1 { - font-size: ($font-size-base * 4.5); + font-size: $jumbotron-heading-font-size; } } } diff --git a/plugins/responsive/public/bootstrap/_list-group.scss b/plugins/responsive/public/bootstrap/_list-group.scss index 26b23ff..7cb83aa 100644 --- a/plugins/responsive/public/bootstrap/_list-group.scss +++ b/plugins/responsive/public/bootstrap/_list-group.scss @@ -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/plugins/responsive/public/bootstrap/_media.scss b/plugins/responsive/public/bootstrap/_media.scss index 292e98d..8c835e8 100644 --- a/plugins/responsive/public/bootstrap/_media.scss +++ b/plugins/responsive/public/bootstrap/_media.scss @@ -7,6 +7,25 @@ } } +.media, +.media-body { + zoom: 1; + overflow: hidden; +} + +.media-body { + width: 10000px; +} + +.media-object { + display: block; + + // Fix collapse in webkit from max-width: 100% and display: table-cell. + &.img-thumbnail { + max-width: none; + } +} + .media-right, .media > .pull-right { padding-left: 10px; diff --git a/plugins/responsive/public/bootstrap/_mixins.scss b/plugins/responsive/public/bootstrap/_mixins.scss index 54ba2d3..78cd5aa 100644 --- a/plugins/responsive/public/bootstrap/_mixins.scss +++ b/plugins/responsive/public/bootstrap/_mixins.scss @@ -2,38 +2,39 @@ // -------------------------------------------------- // Utilities -@import "bootstrap/mixins/hide-text"; -@import "bootstrap/mixins/opacity"; -@import "bootstrap/mixins/image"; -@import "bootstrap/mixins/labels"; -@import "bootstrap/mixins/reset-filter"; -@import "bootstrap/mixins/resize"; -@import "bootstrap/mixins/responsive-visibility"; -@import "bootstrap/mixins/size"; -@import "bootstrap/mixins/tab-focus"; -@import "bootstrap/mixins/text-emphasis"; -@import "bootstrap/mixins/text-overflow"; -@import "bootstrap/mixins/vendor-prefixes"; +@import "mixins/hide-text"; +@import "mixins/opacity"; +@import "mixins/image"; +@import "mixins/labels"; +@import "mixins/reset-filter"; +@import "mixins/resize"; +@import "mixins/responsive-visibility"; +@import "mixins/size"; +@import "mixins/tab-focus"; +@import "mixins/reset-text"; +@import "mixins/text-emphasis"; +@import "mixins/text-overflow"; +@import "mixins/vendor-prefixes"; // Components -@import "bootstrap/mixins/alerts"; -@import "bootstrap/mixins/buttons"; -@import "bootstrap/mixins/panels"; -@import "bootstrap/mixins/pagination"; -@import "bootstrap/mixins/list-group"; -@import "bootstrap/mixins/nav-divider"; -@import "bootstrap/mixins/forms"; -@import "bootstrap/mixins/progress-bar"; -@import "bootstrap/mixins/table-row"; +@import "mixins/alerts"; +@import "mixins/buttons"; +@import "mixins/panels"; +@import "mixins/pagination"; +@import "mixins/list-group"; +@import "mixins/nav-divider"; +@import "mixins/forms"; +@import "mixins/progress-bar"; +@import "mixins/table-row"; // Skins -@import "bootstrap/mixins/background-variant"; -@import "bootstrap/mixins/border-radius"; -@import "bootstrap/mixins/gradients"; +@import "mixins/background-variant"; +@import "mixins/border-radius"; +@import "mixins/gradients"; // Layout -@import "bootstrap/mixins/clearfix"; -@import "bootstrap/mixins/center-block"; -@import "bootstrap/mixins/nav-vertical-align"; -@import "bootstrap/mixins/grid-framework"; -@import "bootstrap/mixins/grid"; +@import "mixins/clearfix"; +@import "mixins/center-block"; +@import "mixins/nav-vertical-align"; +@import "mixins/grid-framework"; +@import "mixins/grid"; diff --git a/plugins/responsive/public/bootstrap/_modals.scss b/plugins/responsive/public/bootstrap/_modals.scss index 2fd097c..837558e 100644 --- a/plugins/responsive/public/bootstrap/_modals.scss +++ b/plugins/responsive/public/bootstrap/_modals.scss @@ -62,10 +62,12 @@ // Modal background .modal-backdrop { - position: absolute; + position: fixed; top: 0; right: 0; + bottom: 0; left: 0; + z-index: $zindex-modal-background; background-color: $modal-backdrop-bg; // Fade for backdrop &.fade { @include opacity(0); } diff --git a/plugins/responsive/public/bootstrap/_navbar.scss b/plugins/responsive/public/bootstrap/_navbar.scss index 73b8587..11e5c01 100644 --- a/plugins/responsive/public/bootstrap/_navbar.scss +++ b/plugins/responsive/public/bootstrap/_navbar.scss @@ -67,7 +67,6 @@ &.collapse { display: block !important; - visibility: visible !important; height: auto !important; padding-bottom: 0; // Override default setting overflow: visible !important; @@ -331,6 +330,7 @@ } // Menu position and menu caret support for dropups via extra dropup class .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; @include border-top-radius($navbar-border-radius); @include border-bottom-radius(0); } diff --git a/plugins/responsive/public/bootstrap/_navs.scss b/plugins/responsive/public/bootstrap/_navs.scss index ce0b917..9d369f3 100644 --- a/plugins/responsive/public/bootstrap/_navs.scss +++ b/plugins/responsive/public/bootstrap/_navs.scss @@ -223,11 +223,9 @@ .tab-content { > .tab-pane { display: none; - visibility: hidden; } > .active { display: block; - visibility: visible; } } diff --git a/plugins/responsive/public/bootstrap/_normalize.scss b/plugins/responsive/public/bootstrap/_normalize.scss index 62a085a..9dddf73 100644 --- a/plugins/responsive/public/bootstrap/_normalize.scss +++ b/plugins/responsive/public/bootstrap/_normalize.scss @@ -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/plugins/responsive/public/bootstrap/_pagination.scss b/plugins/responsive/public/bootstrap/_pagination.scss index 323ec72..fb23f91 100644 --- a/plugins/responsive/public/bootstrap/_pagination.scss +++ b/plugins/responsive/public/bootstrap/_pagination.scss @@ -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 { - @include pagination-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-large); + @include pagination-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large); } // Small .pagination-sm { - @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-small); + @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small); } diff --git a/plugins/responsive/public/bootstrap/_panels.scss b/plugins/responsive/public/bootstrap/_panels.scss index 6c323d9..be9410f 100644 --- a/plugins/responsive/public/bootstrap/_panels.scss +++ b/plugins/responsive/public/bootstrap/_panels.scss @@ -36,7 +36,11 @@ font-size: ceil(($font-size-base * 1.125)); color: inherit; - > a { + > a, + > small, + > .small, + > small > a, + > .small > a { color: inherit; } } @@ -72,6 +76,7 @@ @include border-top-radius(($panel-border-radius - 1)); } } + // Add border bottom radius for last one &:last-child { .list-group-item:last-child { @@ -80,6 +85,11 @@ } } } + > .panel-heading + .panel-collapse > .list-group { + .list-group-item:first-child { + @include border-top-radius(0); + } + } } // Collapse space between when there's no additional content. .panel-heading + .list-group { diff --git a/plugins/responsive/public/bootstrap/_popovers.scss b/plugins/responsive/public/bootstrap/_popovers.scss index 46c45f5..9b90a2e 100644 --- a/plugins/responsive/public/bootstrap/_popovers.scss +++ b/plugins/responsive/public/bootstrap/_popovers.scss @@ -11,12 +11,11 @@ display: none; max-width: $popover-max-width; padding: 1px; - // Reset font and text propertes 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. + @include 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; @include 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/plugins/responsive/public/bootstrap/_print.scss b/plugins/responsive/public/bootstrap/_print.scss index 94ca58f..66e54ab 100644 --- a/plugins/responsive/public/bootstrap/_print.scss +++ b/plugins/responsive/public/bootstrap/_print.scss @@ -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/plugins/responsive/public/bootstrap/_responsive-embed.scss b/plugins/responsive/public/bootstrap/_responsive-embed.scss index c1fa8f8..080a511 100644 --- a/plugins/responsive/public/bootstrap/_responsive-embed.scss +++ b/plugins/responsive/public/bootstrap/_responsive-embed.scss @@ -22,14 +22,14 @@ width: 100%; border: 0; } +} - // Modifier class for 16:9 aspect ratio - &.embed-responsive-16by9 { - padding-bottom: 56.25%; - } +// Modifier class for 16:9 aspect ratio +.embed-responsive-16by9 { + padding-bottom: 56.25%; +} - // Modifier class for 4:3 aspect ratio - &.embed-responsive-4by3 { - padding-bottom: 75%; - } +// Modifier class for 4:3 aspect ratio +.embed-responsive-4by3 { + padding-bottom: 75%; } diff --git a/plugins/responsive/public/bootstrap/_responsive-utilities.scss b/plugins/responsive/public/bootstrap/_responsive-utilities.scss index 4d9e13b..f3f0c83 100644 --- a/plugins/responsive/public/bootstrap/_responsive-utilities.scss +++ b/plugins/responsive/public/bootstrap/_responsive-utilities.scss @@ -18,15 +18,20 @@ // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ -@-ms-viewport { - width: device-width; +@at-root { + @-ms-viewport { + width: device-width; + } } // Visibility utilities // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0 -@include responsive-invisibility('.visible-xs, .visible-sm, .visible-md, .visible-lg'); +@include responsive-invisibility('.visible-xs'); +@include responsive-invisibility('.visible-sm'); +@include responsive-invisibility('.visible-md'); +@include responsive-invisibility('.visible-lg'); .visible-xs-block, .visible-xs-inline, diff --git a/plugins/responsive/public/bootstrap/_scaffolding.scss b/plugins/responsive/public/bootstrap/_scaffolding.scss index 626e5eb..83adb5d 100644 --- a/plugins/responsive/public/bootstrap/_scaffolding.scss +++ b/plugins/responsive/public/bootstrap/_scaffolding.scss @@ -148,3 +148,14 @@ hr { clip: auto; } } + + +// iOS "clickable elements" fix for role="button" +// +// 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 + +[role="button"] { + cursor: pointer; +} diff --git a/plugins/responsive/public/bootstrap/_tables.scss b/plugins/responsive/public/bootstrap/_tables.scss index a575ff1..affcc58 100644 --- a/plugins/responsive/public/bootstrap/_tables.scss +++ b/plugins/responsive/public/bootstrap/_tables.scss @@ -111,7 +111,7 @@ th { // Default zebra-stripe styles (alternating gray and transparent backgrounds) .table-striped { - > tbody > tr:nth-child(odd) { + > tbody > tr:nth-of-type(odd) { background-color: $table-bg-accent; } } @@ -133,7 +133,7 @@ th { // Reset default table behavior table col[class*="col-"] { - position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) + position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623) float: none; display: table-column; } @@ -141,7 +141,7 @@ table { td, th { &[class*="col-"] { - position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) + position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623) float: none; display: table-cell; } diff --git a/plugins/responsive/public/bootstrap/_theme.scss b/plugins/responsive/public/bootstrap/_theme.scss index 51534fe..df571ea 100644 --- a/plugins/responsive/public/bootstrap/_theme.scss +++ b/plugins/responsive/public/bootstrap/_theme.scss @@ -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 @@ @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); } + &.disabled, + &[disabled], + fieldset[disabled] & { + @include box-shadow(none); + } + .badge { text-shadow: none; } @@ -36,7 +47,7 @@ // Mixin for generating new styles @mixin btn-styles($btn-color: #555) { @include gradient-vertical($start-color: $btn-color, $end-color: darken($btn-color, 12%)); - @include reset-filter; // Disable gradients for IE9 because filter bleeds through rounded corners + @include reset-filter; // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620 background-repeat: repeat-x; border-color: darken($btn-color, 14%); @@ -52,10 +63,18 @@ border-color: darken($btn-color, 14%); } - &:disabled, - &[disabled] { - background-color: darken($btn-color, 12%); - background-image: none; + &.disabled, + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &.focus, + &:active, + &.active { + background-color: darken($btn-color, 12%); + background-image: none; + } } } @@ -130,8 +149,8 @@ // Inverted navbar .navbar-inverse { @include gradient-vertical($start-color: lighten($navbar-inverse-bg, 10%), $end-color: $navbar-inverse-bg); - @include reset-filter; // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered - + @include 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 { @include gradient-vertical($start-color: $navbar-inverse-link-active-bg, $end-color: lighten($navbar-inverse-link-active-bg, 2.5%)); diff --git a/plugins/responsive/public/bootstrap/_tooltip.scss b/plugins/responsive/public/bootstrap/_tooltip.scss index c6e4328..f0c1658 100644 --- a/plugins/responsive/public/bootstrap/_tooltip.scss +++ b/plugins/responsive/public/bootstrap/_tooltip.scss @@ -8,12 +8,11 @@ position: absolute; z-index: $zindex-tooltip; display: block; - visibility: visible; - // Reset font and text propertes 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. + @include reset-text; font-size: $font-size-small; - font-weight: normal; - line-height: 1.4; + @include opacity(0); &.in { @include opacity($tooltip-opacity); } @@ -29,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/plugins/responsive/public/bootstrap/_type.scss b/plugins/responsive/public/bootstrap/_type.scss index 62d685c..a39a615 100644 --- a/plugins/responsive/public/bootstrap/_type.scss +++ b/plugins/responsive/public/bootstrap/_type.scss @@ -234,7 +234,7 @@ abbr[data-original-title] { } .initialism { font-size: 90%; - text-transform: uppercase; + @extend .text-uppercase; } // Blockquotes diff --git a/plugins/responsive/public/bootstrap/_utilities.scss b/plugins/responsive/public/bootstrap/_utilities.scss index 386c524..8c99c71 100644 --- a/plugins/responsive/public/bootstrap/_utilities.scss +++ b/plugins/responsive/public/bootstrap/_utilities.scss @@ -44,7 +44,6 @@ .hidden { display: none !important; - visibility: hidden !important; } diff --git a/plugins/responsive/public/bootstrap/_variables.scss b/plugins/responsive/public/bootstrap/_variables.scss index 7d190f2..bf9373b 100644 --- a/plugins/responsive/public/bootstrap/_variables.scss +++ b/plugins/responsive/public/bootstrap/_variables.scss @@ -1,8 +1,4 @@ -// When true, asset path helpers are used, otherwise the regular CSS `url()` is used. -// When there no function is defined, `fn('')` is parsed as string that equals the right hand side -// NB: in Sass 3.3 there is a native function: function-exists(twbs-font-path) -$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default; - +$bootstrap-sass-asset-helper: false !default; // // Variables // -------------------------------------------------- @@ -19,7 +15,7 @@ $gray: lighten($gray-base, 33.5%) !default; // #555 $gray-light: lighten($gray-base, 46.7%) !default; // #777 $gray-lighter: lighten($gray-base, 93.5%) !default; // #eee -$brand-primary: darken(#428bca, 6.5%) !default; +$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7 $brand-success: #5cb85c !default; $brand-info: #5bc0de !default; $brand-warning: #f0ad4e !default; @@ -82,7 +78,8 @@ $headings-color: inherit !default; //** Load fonts from this directory. -// [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths +// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path. +// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths. $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default; //** File name for all font files. @@ -107,7 +104,7 @@ $padding-small-horizontal: 10px !default; $padding-xs-vertical: 1px !default; $padding-xs-horizontal: 5px !default; -$line-height-large: 1.33 !default; +$line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome $line-height-small: 1.5 !default; $border-radius-base: 4px !default; @@ -178,6 +175,11 @@ $btn-danger-border: darken($btn-danger-bg, 5%) !default; $btn-link-disabled-color: $gray-light !default; +// Allows for customizing button radius independently from global border radius +$btn-border-radius-base: $border-radius-base !default; +$btn-border-radius-large: $border-radius-large !default; +$btn-border-radius-small: $border-radius-small !default; + //== Forms // @@ -195,6 +197,7 @@ $input-border: #ccc !default; // TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4 //** Default `.form-control` border radius +// This has no effect on ``s in CSS. $input-border-radius: $border-radius-base !default; //** Large `.form-control` border radius $input-border-radius-large: $border-radius-large !default; @@ -214,6 +217,9 @@ $input-height-large: (ceil($font-size-large * $line-height-large) + //** Small `.form-control` height $input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default; +//** `.form-group` margin +$form-group-margin-bottom: 15px !default; + $legend-color: $gray-dark !default; $legend-border-color: #e5e5e5 !default; @@ -273,7 +279,8 @@ $zindex-dropdown: 1000 !default; $zindex-popover: 1060 !default; $zindex-tooltip: 1070 !default; $zindex-navbar-fixed: 1030 !default; -$zindex-modal: 1040 !default; +$zindex-modal-background: 1040 !default; +$zindex-modal: 1050 !default; //== Media queries breakpoints @@ -386,7 +393,7 @@ $navbar-default-toggle-icon-bar-bg: #888 !default; $navbar-default-toggle-border-color: #ddd !default; -// Inverted navbar +//=== Inverted navbar // Reset inverted navbar basics $navbar-inverse-color: lighten($gray-light, 15%) !default; $navbar-inverse-bg: #222 !default; @@ -487,6 +494,7 @@ $jumbotron-color: inherit !default; $jumbotron-bg: $gray-lighter !default; $jumbotron-heading-color: inherit !default; $jumbotron-font-size: ceil(($font-size-base * 1.5)) !default; +$jumbotron-heading-font-size: ceil(($font-size-base * 4.5)) !default; //== Form states and alerts diff --git a/plugins/responsive/public/bootstrap/mixins/_background-variant.scss b/plugins/responsive/public/bootstrap/mixins/_background-variant.scss index 4993bd2..4c7769e 100644 --- a/plugins/responsive/public/bootstrap/mixins/_background-variant.scss +++ b/plugins/responsive/public/bootstrap/mixins/_background-variant.scss @@ -5,7 +5,8 @@ #{$parent} { background-color: $color; } - a#{$parent}:hover { + a#{$parent}:hover, + a#{$parent}:focus { background-color: darken($color, 10%); } } diff --git a/plugins/responsive/public/bootstrap/mixins/_buttons.scss b/plugins/responsive/public/bootstrap/mixins/_buttons.scss index 74a4ffc..ad31187 100644 --- a/plugins/responsive/public/bootstrap/mixins/_buttons.scss +++ b/plugins/responsive/public/bootstrap/mixins/_buttons.scss @@ -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/plugins/responsive/public/bootstrap/mixins/_grid-framework.scss b/plugins/responsive/public/bootstrap/mixins/_grid-framework.scss index fb28cb4..16d038c 100644 --- a/plugins/responsive/public/bootstrap/mixins/_grid-framework.scss +++ b/plugins/responsive/public/bootstrap/mixins/_grid-framework.scss @@ -13,8 +13,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)); } } diff --git a/plugins/responsive/public/bootstrap/mixins/_grid.scss b/plugins/responsive/public/bootstrap/mixins/_grid.scss index ae16433..0820258 100644 --- a/plugins/responsive/public/bootstrap/mixins/_grid.scss +++ b/plugins/responsive/public/bootstrap/mixins/_grid.scss @@ -13,8 +13,8 @@ // Creates a wrapper for a series of columns @mixin make-row($gutter: $grid-gutter-width) { - margin-left: ($gutter / -2); - margin-right: ($gutter / -2); + margin-left: ceil(($gutter / -2)); + margin-right: floor(($gutter / -2)); @include clearfix; } diff --git a/plugins/responsive/public/bootstrap/mixins/_hide-text.scss b/plugins/responsive/public/bootstrap/mixins/_hide-text.scss index 45db638..cd17cba 100644 --- a/plugins/responsive/public/bootstrap/mixins/_hide-text.scss +++ b/plugins/responsive/public/bootstrap/mixins/_hide-text.scss @@ -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()`. // @@ -8,7 +8,7 @@ // Deprecated as of v3.0.1 (will be removed in v4) @mixin hide-text() { - font: #{0/0} a; + font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; diff --git a/plugins/responsive/public/bootstrap/mixins/_list-group.scss b/plugins/responsive/public/bootstrap/mixins/_list-group.scss index 5f05e7b..c478eeb 100644 --- a/plugins/responsive/public/bootstrap/mixins/_list-group.scss +++ b/plugins/responsive/public/bootstrap/mixins/_list-group.scss @@ -5,10 +5,11 @@ color: $color; background-color: $background; - // [converter] extracted a& to a.list-group-item-#{$state} + // [converter] extracted a&, button& to a.list-group-item-#{$state}, button.list-group-item-#{$state} } - a.list-group-item-#{$state} { + a.list-group-item-#{$state}, + button.list-group-item-#{$state} { color: $color; .list-group-item-heading { diff --git a/plugins/responsive/public/bootstrap/mixins/_opacity.scss b/plugins/responsive/public/bootstrap/mixins/_opacity.scss index df088ad..88e9a57 100644 --- a/plugins/responsive/public/bootstrap/mixins/_opacity.scss +++ b/plugins/responsive/public/bootstrap/mixins/_opacity.scss @@ -4,5 +4,5 @@ opacity: $opacity; // IE8 filter $opacity-ie: ($opacity * 100); - filter: #{alpha(opacity=$opacity-ie)}; + filter: alpha(opacity=$opacity-ie); } diff --git a/plugins/responsive/public/bootstrap/mixins/_pagination.scss b/plugins/responsive/public/bootstrap/mixins/_pagination.scss index 43fff68..d4a5404 100644 --- a/plugins/responsive/public/bootstrap/mixins/_pagination.scss +++ b/plugins/responsive/public/bootstrap/mixins/_pagination.scss @@ -1,11 +1,12 @@ // Pagination -@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) { +@mixin 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/plugins/responsive/public/bootstrap/mixins/_reset-text.scss b/plugins/responsive/public/bootstrap/mixins/_reset-text.scss new file mode 100644 index 0000000..c9c2841 --- /dev/null +++ b/plugins/responsive/public/bootstrap/mixins/_reset-text.scss @@ -0,0 +1,18 @@ +@mixin 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/plugins/responsive/public/bootstrap/mixins/_responsive-visibility.scss b/plugins/responsive/public/bootstrap/mixins/_responsive-visibility.scss index 9867db0..cbdf777 100644 --- a/plugins/responsive/public/bootstrap/mixins/_responsive-visibility.scss +++ b/plugins/responsive/public/bootstrap/mixins/_responsive-visibility.scss @@ -7,7 +7,7 @@ #{$parent} { display: block !important; } - table#{$parent} { display: table; } + table#{$parent} { display: table !important; } tr#{$parent} { display: table-row !important; } th#{$parent}, td#{$parent} { display: table-cell !important; } diff --git a/plugins/responsive/public/bootstrap/mixins/_text-emphasis.scss b/plugins/responsive/public/bootstrap/mixins/_text-emphasis.scss index 1101e03..3b446c4 100644 --- a/plugins/responsive/public/bootstrap/mixins/_text-emphasis.scss +++ b/plugins/responsive/public/bootstrap/mixins/_text-emphasis.scss @@ -5,7 +5,8 @@ #{$parent} { color: $color; } - a#{$parent}:hover { + a#{$parent}:hover, + a#{$parent}:focus { color: darken($color, 10%); } } diff --git a/plugins/responsive/public/bootstrap/mixins/_vendor-prefixes.scss b/plugins/responsive/public/bootstrap/mixins/_vendor-prefixes.scss index a6b9ef4..df4c1ec 100644 --- a/plugins/responsive/public/bootstrap/mixins/_vendor-prefixes.scss +++ b/plugins/responsive/public/bootstrap/mixins/_vendor-prefixes.scss @@ -102,7 +102,7 @@ // Firefox &::-moz-placeholder { color: $color; - opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526 + opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 } &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+ &::-webkit-input-placeholder { color: $color; } // Safari and Chrome diff --git a/plugins/responsive/public/javascripts/bootstrap.js b/plugins/responsive/public/javascripts/bootstrap.js index 53da1c7..5debfd7 100644 --- a/plugins/responsive/public/javascripts/bootstrap.js +++ b/plugins/responsive/public/javascripts/bootstrap.js @@ -1,16 +1,26 @@ /*! - * Bootstrap v3.2.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license */ -if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } +if (typeof jQuery === 'undefined') { + throw new Error('Bootstrap\'s JavaScript requires jQuery') +} + ++function ($) { + 'use strict'; + var version = $.fn.jquery.split(' ')[0].split('.') + if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { + throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') + } +}(jQuery); /* ======================================================================== - * Bootstrap: transition.js v3.2.0 + * Bootstrap: transition.js v3.3.5 * http://getbootstrap.com/javascript/#transitions * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -67,10 +77,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }(jQuery); /* ======================================================================== - * Bootstrap: alert.js v3.2.0 + * Bootstrap: alert.js v3.3.5 * http://getbootstrap.com/javascript/#alerts * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -86,7 +96,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(el).on('click', dismiss, this.close) } - Alert.VERSION = '3.2.0' + Alert.VERSION = '3.3.5' + + Alert.TRANSITION_DURATION = 150 Alert.prototype.close = function (e) { var $this = $(this) @@ -102,7 +114,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (e) e.preventDefault() if (!$parent.length) { - $parent = $this.hasClass('alert') ? $this : $this.parent() + $parent = $this.closest('.alert') } $parent.trigger(e = $.Event('close.bs.alert')) @@ -119,7 +131,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $.support.transition && $parent.hasClass('fade') ? $parent .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(150) : + .emulateTransitionEnd(Alert.TRANSITION_DURATION) : removeElement() } @@ -160,10 +172,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }(jQuery); /* ======================================================================== - * Bootstrap: button.js v3.2.0 + * Bootstrap: button.js v3.3.5 * http://getbootstrap.com/javascript/#buttons * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -180,7 +192,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.isLoading = false } - Button.VERSION = '3.2.0' + Button.VERSION = '3.3.5' Button.DEFAULTS = { loadingText: 'loading...' @@ -192,14 +204,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re 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]()) - $el[val](data[state] == null ? this.options[state] : data[state]) - // push to event loop to allow forms to submit setTimeout($.proxy(function () { + $el[val](data[state] == null ? this.options[state] : data[state]) + if (state == 'loadingText') { this.isLoading = true $el.addClass(d).attr(d, d) @@ -217,13 +229,19 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re 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') } @@ -261,20 +279,24 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // BUTTON DATA-API // =============== - $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - e.preventDefault() - }) + $(document) + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + Plugin.call($btn, 'toggle') + 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)) + }) }(jQuery); /* ======================================================================== - * Bootstrap: carousel.js v3.2.0 + * Bootstrap: carousel.js v3.3.5 * http://getbootstrap.com/javascript/#carousel * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -286,29 +308,35 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ========================= var Carousel = function (element, options) { - this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) + this.$element = $(element) this.$indicators = this.$element.find('.carousel-indicators') this.options = options - this.paused = - this.sliding = - this.interval = - this.$active = + this.paused = null + this.sliding = null + this.interval = null + this.$active = null this.$items = null - this.options.pause == 'hover' && this.$element + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) + + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } - Carousel.VERSION = '3.2.0' + Carousel.VERSION = '3.3.5' + + Carousel.TRANSITION_DURATION = 600 Carousel.DEFAULTS = { interval: 5000, pause: 'hover', - wrap: true + wrap: true, + keyboard: true } Carousel.prototype.keydown = function (e) { + if (/input|textarea/i.test(e.target.tagName)) return switch (e.which) { case 37: this.prev(); break case 39: this.next(); break @@ -335,6 +363,16 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re return this.$items.index(item || this.$active) } + Carousel.prototype.getItemForDirection = function (direction, active) { + var activeIndex = this.getItemIndex(active) + var willWrap = (direction == 'prev' && activeIndex === 0) + || (direction == 'next' && activeIndex == (this.$items.length - 1)) + if (willWrap && !this.options.wrap) return active + var delta = direction == 'prev' ? -1 : 1 + var itemIndex = (activeIndex + delta) % this.$items.length + return this.$items.eq(itemIndex) + } + Carousel.prototype.to = function (pos) { var that = this var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) @@ -344,7 +382,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" if (activeIndex == pos) return this.pause().cycle() - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) } Carousel.prototype.pause = function (e) { @@ -372,17 +410,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re Carousel.prototype.slide = function (type, next) { var $active = this.$element.find('.item.active') - var $next = next || $active[type]() + var $next = next || this.getItemForDirection(type, $active) var isCycling = this.interval var direction = type == 'next' ? 'left' : 'right' - var fallback = type == 'next' ? 'first' : 'last' var that = this - if (!$next.length) { - if (!this.options.wrap) return - $next = this.$element.find('.item')[fallback]() - } - if ($next.hasClass('active')) return (this.sliding = false) var relatedTarget = $next[0] @@ -418,7 +450,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re that.$element.trigger(slidEvent) }, 0) }) - .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + .emulateTransitionEnd(Carousel.TRANSITION_DURATION) } else { $active.removeClass('active') $next.addClass('active') @@ -467,7 +499,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // CAROUSEL DATA-API // ================= - $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var clickHandler = function (e) { var href var $this = $(this) var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 @@ -483,7 +515,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } e.preventDefault() - }) + } + + $(document) + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { @@ -495,10 +531,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }(jQuery); /* ======================================================================== - * Bootstrap: collapse.js v3.2.0 + * Bootstrap: collapse.js v3.3.5 * http://getbootstrap.com/javascript/#collapse * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -512,13 +548,22 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var Collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, Collapse.DEFAULTS, options) + this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning = null - if (this.options.parent) this.$parent = $(this.options.parent) + if (this.options.parent) { + this.$parent = this.getParent() + } else { + this.addAriaAndCollapsedClass(this.$element, this.$trigger) + } + if (this.options.toggle) this.toggle() } - Collapse.VERSION = '3.2.0' + Collapse.VERSION = '3.3.5' + + Collapse.TRANSITION_DURATION = 350 Collapse.DEFAULTS = { toggle: true @@ -532,17 +577,21 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re Collapse.prototype.show = function () { if (this.transitioning || this.$element.hasClass('in')) return + var activesData + var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') + + if (actives && actives.length) { + activesData = actives.data('bs.collapse') + if (activesData && activesData.transitioning) return + } + var startEvent = $.Event('show.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return - var actives = this.$parent && this.$parent.find('> .panel > .in') - if (actives && actives.length) { - var hasData = actives.data('bs.collapse') - if (hasData && hasData.transitioning) return Plugin.call(actives, 'hide') - hasData || actives.data('bs.collapse', null) + activesData || actives.data('bs.collapse', null) } var dimension = this.dimension() @@ -550,6 +599,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .removeClass('collapse') .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) + + this.$trigger + .removeClass('collapsed') + .attr('aria-expanded', true) this.transitioning = 1 @@ -568,7 +622,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function () { @@ -584,17 +638,21 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .addClass('collapsing') - .removeClass('collapse') - .removeClass('in') + .removeClass('collapse in') + .attr('aria-expanded', false) + + this.$trigger + .addClass('collapsed') + .attr('aria-expanded', false) this.transitioning = 1 var complete = function () { this.transitioning = 0 this.$element - .trigger('hidden.bs.collapse') .removeClass('collapsing') .addClass('collapse') + .trigger('hidden.bs.collapse') } if (!$.support.transition) return complete.call(this) @@ -602,13 +660,40 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element [dimension](0) .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(350) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION) } Collapse.prototype.toggle = function () { this[this.$element.hasClass('in') ? 'hide' : 'show']() } + Collapse.prototype.getParent = function () { + return $(this.options.parent) + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') + .each($.proxy(function (i, element) { + var $element = $(element) + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) + }, this)) + .end() + } + + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { + var isOpen = $element.hasClass('in') + + $element.attr('aria-expanded', isOpen) + $trigger + .toggleClass('collapsed', !isOpen) + .attr('aria-expanded', isOpen) + } + + function getTargetFromTrigger($trigger) { + var href + var target = $trigger.attr('data-target') + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + + return $(target) + } + // COLLAPSE PLUGIN DEFINITION // ========================== @@ -619,7 +704,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var data = $this.data('bs.collapse') var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - if (!data && options.toggle && option == 'show') option = !option + if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) @@ -644,21 +729,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var href var $this = $(this) - var target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - var $target = $(target) + + if (!$this.attr('data-target')) e.preventDefault() + + var $target = getTargetFromTrigger($this) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() - var parent = $this.attr('data-parent') - var $parent = parent && $(parent) - - if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - } Plugin.call($target, option) }) @@ -666,10 +743,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }(jQuery); /* ======================================================================== - * Bootstrap: dropdown.js v3.2.0 + * Bootstrap: dropdown.js v3.3.5 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. + * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -686,7 +763,41 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(element).on('click.bs.dropdown', this.toggle) } - Dropdown.VERSION = '3.2.0' + 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) @@ -701,7 +812,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { // if mobile we use a backdrop because click events don't delegate - $('