From d79e9352431de6965d4e461087c90b3017976b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Goetz?= Date: Tue, 21 Jul 2015 18:45:40 +0200 Subject: [PATCH] Update Twitter bootstrap - did not compile yet --- .../themes/_common/less/bootstrap/badges.less | 17 +- .../_common/less/bootstrap/bootstrap.less | 12 +- .../_common/less/bootstrap/button-groups.less | 27 ++- .../_common/less/bootstrap/buttons.less | 21 +- .../_common/less/bootstrap/carousel.less | 28 ++- .../themes/_common/less/bootstrap/close.less | 1 + .../themes/_common/less/bootstrap/code.less | 1 + .../less/bootstrap/component-animations.less | 4 +- .../_common/less/bootstrap/dropdowns.less | 17 +- .../themes/_common/less/bootstrap/forms.less | 140 +++++++++---- .../_common/less/bootstrap/glyphicons.less | 74 ++++++- .../_common/less/bootstrap/input-groups.less | 1 + .../_common/less/bootstrap/jumbotron.less | 12 +- .../_common/less/bootstrap/list-group.less | 24 +-- .../themes/_common/less/bootstrap/media.less | 76 ++++--- .../themes/_common/less/bootstrap/mixins.less | 1 + .../bootstrap/mixins/background-variant.less | 3 +- .../less/bootstrap/mixins/buttons.less | 20 +- .../less/bootstrap/mixins/grid-framework.less | 8 +- .../_common/less/bootstrap/mixins/grid.less | 4 +- .../less/bootstrap/mixins/hide-text.less | 2 +- .../_common/less/bootstrap/mixins/labels.less | 2 +- .../less/bootstrap/mixins/list-group.less | 3 +- .../less/bootstrap/mixins/pagination.less | 3 +- .../less/bootstrap/mixins/reset-text.less | 18 ++ .../mixins/responsive-visibility.less | 2 +- .../less/bootstrap/mixins/text-emphasis.less | 3 +- .../bootstrap/mixins/vendor-prefixes.less | 9 +- .../themes/_common/less/bootstrap/modals.less | 4 +- .../themes/_common/less/bootstrap/navbar.less | 7 +- .../themes/_common/less/bootstrap/navs.less | 2 +- .../_common/less/bootstrap/normalize.less | 25 ++- .../themes/_common/less/bootstrap/pager.less | 3 +- .../_common/less/bootstrap/pagination.less | 7 +- .../themes/_common/less/bootstrap/panels.less | 36 +++- .../_common/less/bootstrap/popovers.less | 12 +- .../themes/_common/less/bootstrap/print.less | 188 +++++++++--------- .../_common/less/bootstrap/progress-bars.less | 15 +- .../less/bootstrap/responsive-embed.less | 23 ++- .../_common/less/bootstrap/scaffolding.less | 13 +- .../themes/_common/less/bootstrap/tables.less | 11 +- .../themes/_common/less/bootstrap/theme.less | 63 ++++-- .../_common/less/bootstrap/thumbnails.less | 2 +- .../_common/less/bootstrap/tooltip.less | 20 +- .../themes/_common/less/bootstrap/type.less | 8 +- .../_common/less/bootstrap/utilities.less | 1 - .../_common/less/bootstrap/variables.less | 48 +++-- 47 files changed, 676 insertions(+), 345 deletions(-) create mode 100644 resources/themes/_common/less/bootstrap/mixins/reset-text.less diff --git a/resources/themes/_common/less/bootstrap/badges.less b/resources/themes/_common/less/bootstrap/badges.less index 20624f3..6ee16dc 100644 --- a/resources/themes/_common/less/bootstrap/badges.less +++ b/resources/themes/_common/less/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; @@ -28,7 +28,9 @@ position: relative; top: -1px; } - .btn-xs & { + + .btn-xs &, + .btn-group-xs > .btn & { top: 0; padding: 1px 5px; } @@ -44,11 +46,20 @@ } // Account for badges in navs - a.list-group-item.active > &, + .list-group-item.active > &, .nav-pills > .active > a > & { 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/resources/themes/_common/less/bootstrap/bootstrap.less b/resources/themes/_common/less/bootstrap/bootstrap.less index 155dff5..6ab589d 100644 --- a/resources/themes/_common/less/bootstrap/bootstrap.less +++ b/resources/themes/_common/less/bootstrap/bootstrap.less @@ -1,10 +1,17 @@ +/*! + * 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"; -// Reset +// Reset and dependencies @import "normalize.less"; @import "print.less"; +@import "glyphicons.less"; // Core CSS @import "scaffolding.less"; @@ -17,7 +24,6 @@ // Components //@import "component-animations.less"; -@import "glyphicons.less"; //@import "dropdowns.less"; //@import "button-groups.less"; //@import "input-groups.less"; @@ -35,9 +41,9 @@ //@import "media.less"; //@import "list-group.less"; //@import "panels.less"; +//@import "responsive-embed.less"; @import "wells.less"; //@import "close.less"; -//@import "responsive-embed.less"; // Components w/ JavaScript //@import "modals.less"; diff --git a/resources/themes/_common/less/bootstrap/button-groups.less b/resources/themes/_common/less/bootstrap/button-groups.less index c2e2260..6a0c5a8 100644 --- a/resources/themes/_common/less/bootstrap/button-groups.less +++ b/resources/themes/_common/less/bootstrap/button-groups.less @@ -18,10 +18,6 @@ &.active { z-index: 2; } - &:focus { - // Remove focus outline when dropdown JS adds it after closing the menu - outline: 0; - } } } @@ -40,6 +36,7 @@ margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); + .btn, .btn-group, .input-group { float: left; @@ -75,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 { .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 { .border-left-radius(0); } @@ -176,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); } } @@ -198,7 +195,6 @@ } - // Justified button groups // ---------------------- @@ -226,11 +222,14 @@ // Checkbox and radio options // // In order to support the browser's form validation feedback, powered by the -// `required` attribute, we have to "hide" the inputs via `opacity`. We cannot -// use `display: none;` or `visibility: hidden;` as that also hides the popover. +// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use +// `display: none;` or `visibility: hidden;` as that also hides the popover. +// Simply visually hiding the inputs via `opacity` would leave them clickable in +// certain cases which is prevented by using `clip` and `pointer-events`. // This way, we ensure a DOM element is visible to position the popover from. // -// See https://github.com/twbs/bootstrap/pull/12794 for more. +// See https://github.com/twbs/bootstrap/pull/12794 and +// https://github.com/twbs/bootstrap/pull/14559 for more information. [data-toggle="buttons"] { > .btn, @@ -238,8 +237,8 @@ input[type="radio"], input[type="checkbox"] { position: absolute; - z-index: -1; - .opacity(0); + clip: rect(0,0,0,0); + pointer-events: none; } } } diff --git a/resources/themes/_common/less/bootstrap/buttons.less b/resources/themes/_common/less/bootstrap/buttons.less index 05bd89d..9cbb8f4 100644 --- a/resources/themes/_common/less/bootstrap/buttons.less +++ b/resources/themes/_common/less/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); &, @@ -46,11 +46,17 @@ &.disabled, &[disabled], fieldset[disabled] & { - cursor: not-allowed; - pointer-events: none; // Future-proof disabling of clicks + cursor: @cursor-disabled; .opacity(.65); .box-shadow(none); } + + a& { + &.disabled, + fieldset[disabled] & { + pointer-events: none; // Future-proof disabling of clicks on `` elements + } + } } @@ -92,6 +98,7 @@ &, &:active, + &.active, &[disabled], fieldset[disabled] & { background-color: transparent; @@ -106,7 +113,7 @@ &:hover, &:focus { color: @link-hover-color; - text-decoration: underline; + text-decoration: @link-hover-decoration; background-color: transparent; } &[disabled], @@ -125,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/resources/themes/_common/less/bootstrap/carousel.less b/resources/themes/_common/less/bootstrap/carousel.less index 1644ddf..87ed696 100644 --- a/resources/themes/_common/less/bootstrap/carousel.less +++ b/resources/themes/_common/less/bootstrap/carousel.less @@ -24,6 +24,30 @@ &:extend(.img-responsive); line-height: 1; } + + // WebKit CSS3 transforms for supported devices + @media all and (transform-3d), (-webkit-transform-3d) { + .transition-transform(~'0.6s ease-in-out'); + .backface-visibility(~'hidden'); + .perspective(1000px); + + &.next, + &.active.right { + .translate3d(100%, 0, 0); + left: 0; + } + &.prev, + &.active.left { + .translate3d(-100%, 0, 0); + left: 0; + } + &.next.left, + &.prev.right, + &.active { + .translate3d(0, 0, 0); + left: 0; + } + } } > .active, @@ -106,6 +130,7 @@ .glyphicon-chevron-right { position: absolute; top: 50%; + margin-top: -10px; z-index: 5; display: inline-block; } @@ -123,7 +148,7 @@ .icon-next { width: 20px; height: 20px; - margin-top: -10px; + line-height: 1; font-family: serif; } @@ -171,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/resources/themes/_common/less/bootstrap/close.less b/resources/themes/_common/less/bootstrap/close.less index 9b4e74f..6d5bfe0 100644 --- a/resources/themes/_common/less/bootstrap/close.less +++ b/resources/themes/_common/less/bootstrap/close.less @@ -23,6 +23,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& { padding: 0; cursor: pointer; diff --git a/resources/themes/_common/less/bootstrap/code.less b/resources/themes/_common/less/bootstrap/code.less index baa13df..a08b4d4 100644 --- a/resources/themes/_common/less/bootstrap/code.less +++ b/resources/themes/_common/less/bootstrap/code.less @@ -32,6 +32,7 @@ kbd { kbd { padding: 0; font-size: 100%; + font-weight: bold; box-shadow: none; } } diff --git a/resources/themes/_common/less/bootstrap/component-animations.less b/resources/themes/_common/less/bootstrap/component-animations.less index 9400a0d..0bcee91 100644 --- a/resources/themes/_common/less/bootstrap/component-animations.less +++ b/resources/themes/_common/less/bootstrap/component-animations.less @@ -27,5 +27,7 @@ position: relative; height: 0; overflow: hidden; - .transition(height .35s ease); + .transition-property(~"height, visibility"); + .transition-duration(.35s); + .transition-timing-function(ease); } diff --git a/resources/themes/_common/less/bootstrap/dropdowns.less b/resources/themes/_common/less/bootstrap/dropdowns.less index 3eb7fc0..f6876c1 100644 --- a/resources/themes/_common/less/bootstrap/dropdowns.less +++ b/resources/themes/_common/less/bootstrap/dropdowns.less @@ -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; } @@ -103,16 +105,15 @@ &:focus { color: @dropdown-link-disabled-color; } -} -// Nuke hover/focus effects -.dropdown-menu > .disabled > a { + + // Nuke hover/focus effects &:hover, &:focus { text-decoration: none; background-color: transparent; background-image: none; // Remove CSS gradient .reset-filter(); - cursor: not-allowed; + cursor: @cursor-disabled; } } @@ -184,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; } } @@ -212,4 +214,3 @@ } } } - diff --git a/resources/themes/_common/less/bootstrap/forms.less b/resources/themes/_common/less/bootstrap/forms.less index 98a40cb..b064ede 100644 --- a/resources/themes/_common/less/bootstrap/forms.less +++ b/resources/themes/_common/less/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; } @@ -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. .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); @@ -141,9 +140,13 @@ output { &[disabled], &[readonly], fieldset[disabled] & { - cursor: not-allowed; 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; } // Reset height for `textarea`s @@ -168,24 +171,30 @@ input[type="search"] { // Special styles for iOS temporal inputs // // 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. Since this fucks up everything else, we have to -// appropriately reset it for Internet Explorer and the size variations. +// 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`. -input[type="date"], -input[type="time"], -input[type="datetime-local"], -input[type="month"] { - line-height: @input-height-base; - // IE8+ misaligns the text within date inputs, so we reset - line-height: @line-height-base ~"\0"; +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + &.form-control { + line-height: @input-height-base; + } - &.input-sm { - line-height: @input-height-small; - } - &.input-lg { - line-height: @input-height-large; + &.input-sm, + .input-group-sm & { + line-height: @input-height-small; + } + + &.input-lg, + .input-group-lg & { + line-height: @input-height-large; + } } } @@ -196,7 +205,7 @@ input[type="month"] { // horizontal forms, use the predefined grid classes. .form-group { - margin-bottom: 15px; + margin-bottom: @form-group-margin-bottom; } @@ -236,6 +245,7 @@ input[type="month"] { // Radios and checkboxes on same line .radio-inline, .checkbox-inline { + position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; @@ -258,7 +268,7 @@ input[type="checkbox"] { &[disabled], &.disabled, fieldset[disabled] & { - cursor: not-allowed; + cursor: @cursor-disabled; } } // These classes are used directly on