From 41655532e9556d03f515a62175a8718a62596383 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 28 Jan 2020 12:42:16 +0100 Subject: [PATCH] Upgrade bootstrap to 3.4.0 --- .../static/bootstrap/scss/_bootstrap.scss | 4 +- .../bootstrap/scss/bootstrap/_alerts.scss | 6 +- .../bootstrap/scss/bootstrap/_badges.scss | 6 +- .../scss/bootstrap/_breadcrumbs.scss | 4 +- .../scss/bootstrap/_button-groups.scss | 12 +- .../bootstrap/scss/bootstrap/_buttons.scss | 8 +- .../bootstrap/scss/bootstrap/_carousel.scss | 51 +++--- .../bootstrap/scss/bootstrap/_close.scss | 1 + .../bootstrap/scss/bootstrap/_code.scss | 6 +- .../scss/bootstrap/_component-animations.scss | 1 + .../bootstrap/scss/bootstrap/_dropdowns.scss | 43 +++-- .../bootstrap/scss/bootstrap/_forms.scss | 108 ++++++------ .../bootstrap/scss/bootstrap/_glyphicons.scss | 18 +- .../bootstrap/scss/bootstrap/_grid.scss | 10 ++ .../scss/bootstrap/_input-groups.scss | 6 +- .../bootstrap/scss/bootstrap/_jumbotron.scss | 10 +- .../bootstrap/scss/bootstrap/_labels.scss | 2 +- .../bootstrap/scss/bootstrap/_list-group.scss | 62 ++++--- .../bootstrap/scss/bootstrap/_media.scss | 2 +- .../bootstrap/scss/bootstrap/_modals.scss | 14 +- .../bootstrap/scss/bootstrap/_navbar.scss | 156 +++++++++--------- .../bootstrap/scss/bootstrap/_navs.scss | 8 +- .../bootstrap/scss/bootstrap/_normalize.scss | 7 +- .../bootstrap/scss/bootstrap/_pager.scss | 4 +- .../bootstrap/scss/bootstrap/_pagination.scss | 27 ++- .../bootstrap/scss/bootstrap/_panels.scss | 10 +- .../bootstrap/scss/bootstrap/_popovers.scss | 99 ++++++----- .../bootstrap/scss/bootstrap/_print.scss | 148 ++++++++--------- .../scss/bootstrap/_progress-bars.scss | 6 +- .../scss/bootstrap/_responsive-embed.scss | 4 +- .../scss/bootstrap/_responsive-utilities.scss | 6 +- .../scss/bootstrap/_scaffolding.scss | 14 +- .../bootstrap/scss/bootstrap/_tables.scss | 46 +++--- .../bootstrap/scss/bootstrap/_theme.scss | 38 +++-- .../bootstrap/scss/bootstrap/_thumbnails.scss | 2 +- .../bootstrap/scss/bootstrap/_tooltip.scss | 65 +++++--- .../bootstrap/scss/bootstrap/_type.scss | 20 +-- .../bootstrap/scss/bootstrap/_variables.scss | 14 +- .../bootstrap/scss/bootstrap/_wells.scss | 4 +- .../scss/bootstrap/mixins/_alerts.scss | 3 +- .../scss/bootstrap/mixins/_border-radius.scss | 8 +- .../scss/bootstrap/mixins/_buttons.scss | 16 +- .../scss/bootstrap/mixins/_center-block.scss | 2 +- .../scss/bootstrap/mixins/_clearfix.scss | 2 +- .../scss/bootstrap/mixins/_forms.scss | 8 +- .../scss/bootstrap/mixins/_gradients.scss | 14 +- .../bootstrap/mixins/_grid-framework.scss | 2 +- .../scss/bootstrap/mixins/_grid.scss | 14 +- .../scss/bootstrap/mixins/_image.scss | 15 +- .../scss/bootstrap/mixins/_opacity.scss | 5 +- .../scss/bootstrap/mixins/_reset-text.scss | 8 +- .../scss/bootstrap/mixins/_resize.scss | 2 +- .../mixins/_responsive-visibility.scss | 4 - .../scss/bootstrap/mixins/_tab-focus.scss | 6 +- .../bootstrap/mixins/_vendor-prefixes.scss | 2 +- 55 files changed, 574 insertions(+), 589 deletions(-) diff --git a/src/pretix/static/bootstrap/scss/_bootstrap.scss b/src/pretix/static/bootstrap/scss/_bootstrap.scss index f7b5210866..a56d5b8261 100644 --- a/src/pretix/static/bootstrap/scss/_bootstrap.scss +++ b/src/pretix/static/bootstrap/scss/_bootstrap.scss @@ -1,6 +1,6 @@ /*! - * Bootstrap v3.3.6 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. + * Bootstrap v3.4.1 (https://getbootstrap.com/) + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_alerts.scss b/src/pretix/static/bootstrap/scss/bootstrap/_alerts.scss index 7d1e1fddd1..f9e69bd084 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_alerts.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_alerts.scss @@ -15,8 +15,7 @@ // Headings for larger alerts h4 { margin-top: 0; - // Specified for the h4 to prevent conflicts of changing $headings-color - color: inherit; + color: inherit; // Specified for the h4 to prevent conflicts of changing $headings-color } // Provide class for links that match alerts @@ -39,7 +38,8 @@ // // Expand the right padding and account for the close button's positioning. -.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. +// The misspelled .alert-dismissable was deprecated in 3.2.0. +.alert-dismissable, .alert-dismissible { padding-right: ($alert-padding + 20); diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_badges.scss b/src/pretix/static/bootstrap/scss/bootstrap/_badges.scss index 70002e085b..44d5dd6f4b 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_badges.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_badges.scss @@ -10,11 +10,11 @@ padding: 3px 7px; font-size: $font-size-small; font-weight: $badge-font-weight; - color: $badge-color; line-height: $badge-line-height; - vertical-align: middle; - white-space: nowrap; + color: $badge-color; text-align: center; + white-space: nowrap; + vertical-align: middle; background-color: $badge-bg; border-radius: $badge-border-radius; diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_breadcrumbs.scss b/src/pretix/static/bootstrap/scss/bootstrap/_breadcrumbs.scss index b61f0c731c..67e39d909a 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_breadcrumbs.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_breadcrumbs.scss @@ -14,11 +14,11 @@ display: inline-block; + li:before { + padding: 0 5px; + color: $breadcrumb-color; // [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/src/pretix/static/bootstrap/scss/bootstrap/_button-groups.scss b/src/pretix/static/bootstrap/scss/bootstrap/_button-groups.scss index baaacc4446..6a62faf5df 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_button-groups.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_button-groups.scss @@ -59,7 +59,7 @@ @include border-right-radius(0); } } -// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { @include border-left-radius(0); @@ -103,18 +103,18 @@ // Give the line between buttons some depth .btn-group > .btn + .dropdown-toggle { - padding-left: 8px; padding-right: 8px; + padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { - padding-left: 12px; padding-right: 12px; + padding-left: 12px; } // The clickable button for toggling the menu // Remove the gradient and set the same inset shadow as the :active state .btn-group.open .dropdown-toggle { - @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); + @include box-shadow(inset 0 3px 5px rgba(0, 0, 0, .125)); // Show no shadow for `.btn-link` since it has no other button styles. &.btn-link { @@ -205,8 +205,8 @@ border-collapse: separate; > .btn, > .btn-group { - float: none; display: table-cell; + float: none; width: 1%; } > .btn-group .btn { @@ -237,7 +237,7 @@ input[type="radio"], input[type="checkbox"] { position: absolute; - clip: rect(0,0,0,0); + clip: rect(0, 0, 0, 0); pointer-events: none; } } diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_buttons.scss b/src/pretix/static/bootstrap/scss/bootstrap/_buttons.scss index 6452b709f1..62962d786a 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_buttons.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_buttons.scss @@ -11,12 +11,12 @@ margin-bottom: 0; // For input.btn font-weight: $btn-font-weight; text-align: center; + white-space: nowrap; vertical-align: middle; touch-action: manipulation; cursor: pointer; 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, $btn-border-radius-base); @include user-select(none); @@ -38,9 +38,9 @@ &:active, &.active { - outline: 0; background-image: none; - @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); + outline: 0; + @include box-shadow(inset 0 3px 5px rgba(0, 0, 0, .125)); } &.disabled, @@ -94,8 +94,8 @@ a.btn { // Make a button look and behave like a link .btn-link { + font-weight: 400; color: $link-color; - font-weight: normal; border-radius: 0; &, diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_carousel.scss b/src/pretix/static/bootstrap/scss/bootstrap/_carousel.scss index 753d881f45..52a1f7bff0 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_carousel.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_carousel.scss @@ -10,12 +10,12 @@ .carousel-inner { position: relative; - overflow: hidden; width: 100%; + overflow: hidden; > .item { - display: none; position: relative; + display: none; @include transition(.6s ease-in-out left); // Account for jankitude on images @@ -93,34 +93,34 @@ .carousel-control { position: absolute; top: 0; - left: 0; bottom: 0; + left: 0; width: $carousel-control-width; - @include opacity($carousel-control-opacity); font-size: $carousel-control-font-size; color: $carousel-control-color; text-align: center; text-shadow: $carousel-text-shadow; background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug + @include opacity($carousel-control-opacity); // We can't have this transition here because WebKit cancels the carousel // animation if you trip this while in the middle of another animation. // Set gradients for backgrounds &.left { - @include gradient-horizontal($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001)); + @include gradient-horizontal($start-color: rgba(0, 0, 0, .5), $end-color: rgba(0, 0, 0, .0001)); } &.right { - left: auto; right: 0; - @include gradient-horizontal($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5)); + left: auto; + @include gradient-horizontal($start-color: rgba(0, 0, 0, .0001), $end-color: rgba(0, 0, 0, .5)); } // Hover/focus state &:hover, &:focus { - outline: 0; color: $carousel-control-color; text-decoration: none; + outline: 0; @include opacity(.9); } @@ -131,9 +131,9 @@ .glyphicon-chevron-right { position: absolute; top: 50%; - margin-top: -10px; z-index: 5; display: inline-block; + margin-top: -10px; } .icon-prev, .glyphicon-chevron-left { @@ -147,21 +147,20 @@ } .icon-prev, .icon-next { - width: 20px; + width: 20px; height: 20px; - line-height: 1; font-family: serif; + line-height: 1; } - .icon-prev { &:before { - content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) + content: "\2039";// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) } } .icon-next { &:before { - content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) + content: "\203a";// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) } } } @@ -177,21 +176,18 @@ left: 50%; z-index: 15; width: 60%; - margin-left: -30%; padding-left: 0; - list-style: none; + margin-left: -30%; text-align: center; + list-style: none; li { display: inline-block; - width: 10px; + width: 10px; height: 10px; margin: 1px; text-indent: -999px; - border: 1px solid $carousel-indicator-border-color; - border-radius: 10px; cursor: pointer; - // IE8-9 hack for event handling // // Internet Explorer 8-9 does not support clicks on elements without a set @@ -202,12 +198,16 @@ // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we // set alpha transparency for the best results possible. background-color: #000 \9; // IE8 - background-color: rgba(0,0,0,0); // IE9 + background-color: rgba(0, 0, 0, 0); // IE9 + + border: 1px solid $carousel-indicator-border-color; + border-radius: 10px; } + .active { - margin: 0; - width: 12px; + width: 12px; height: 12px; + margin: 0; background-color: $carousel-indicator-active-bg; } } @@ -217,15 +217,16 @@ // Hidden by default for smaller viewports .carousel-caption { position: absolute; - left: 15%; right: 15%; bottom: 20px; + left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: $carousel-caption-color; text-align: center; text-shadow: $carousel-text-shadow; + & .btn { text-shadow: none; // No shadow for button elements in carousel-caption } @@ -258,8 +259,8 @@ // Show and left align the captions .carousel-caption { - left: 20%; right: 20%; + left: 20%; padding-bottom: 30px; } diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_close.scss b/src/pretix/static/bootstrap/scss/bootstrap/_close.scss index 3b74d8a973..a858a8f367 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_close.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_close.scss @@ -33,4 +33,5 @@ button.close { background: transparent; border: 0; -webkit-appearance: none; + appearance: none; } diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_code.scss b/src/pretix/static/bootstrap/scss/bootstrap/_code.scss index caa5f06304..8e2b2a7f43 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_code.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_code.scss @@ -27,12 +27,12 @@ kbd { color: $kbd-color; background-color: $kbd-bg; border-radius: $border-radius-small; - box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); kbd { padding: 0; font-size: 100%; - font-weight: bold; + font-weight: 700; box-shadow: none; } } @@ -44,9 +44,9 @@ pre { margin: 0 0 ($line-height-computed / 2); font-size: ($font-size-base - 1); // 14px to 13px line-height: $line-height-base; + color: $pre-color; word-break: break-all; word-wrap: break-word; - color: $pre-color; background-color: $pre-bg; border: 1px solid $pre-border-color; border-radius: $border-radius-base; diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_component-animations.scss b/src/pretix/static/bootstrap/scss/bootstrap/_component-animations.scss index ca3b43ca78..ca4d6b0682 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_component-animations.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_component-animations.scss @@ -10,6 +10,7 @@ .fade { opacity: 0; @include transition(opacity .15s linear); + &.in { opacity: 1; } diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_dropdowns.scss b/src/pretix/static/bootstrap/scss/bootstrap/_dropdowns.scss index aac84597a4..0a5898a8d0 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_dropdowns.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_dropdowns.scss @@ -10,10 +10,10 @@ height: 0; margin-left: 2px; vertical-align: middle; - border-top: $caret-width-base dashed; - border-top: $caret-width-base solid \9; // IE8 + 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; + border-left: $caret-width-base solid transparent; } // The dropdown wrapper (div) @@ -38,15 +38,15 @@ min-width: 160px; padding: 5px 0; margin: 2px 0 0; // override default ul - list-style: none; font-size: $font-size-base; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) + list-style: none; background-color: $dropdown-bg; + background-clip: padding-box; border: 1px solid $dropdown-fallback-border; // IE8 fallback border: 1px solid $dropdown-border; border-radius: $border-radius-base; - @include box-shadow(0 6px 12px rgba(0,0,0,.175)); - background-clip: padding-box; + @include box-shadow(0 6px 12px rgba(0, 0, 0, .175)); // Aligns the dropdown menu to right // @@ -66,20 +66,17 @@ display: block; padding: 3px 20px; clear: both; - font-weight: normal; + font-weight: 400; line-height: $line-height-base; color: $dropdown-link-color; white-space: nowrap; // prevent links from randomly breaking onto new lines - } -} -// Hover/Focus state -.dropdown-menu > li > a { - &:hover, - &:focus { - text-decoration: none; - color: $dropdown-link-hover-color; - background-color: $dropdown-link-hover-bg; + &:hover, + &:focus { + color: $dropdown-link-hover-color; + text-decoration: none; + background-color: $dropdown-link-hover-bg; + } } } @@ -90,8 +87,8 @@ &:focus { color: $dropdown-link-active-color; text-decoration: none; - outline: 0; background-color: $dropdown-link-active-bg; + outline: 0; } } @@ -110,10 +107,10 @@ &:hover, &:focus { text-decoration: none; + cursor: $cursor-disabled; background-color: transparent; background-image: none; // Remove CSS gradient @include reset-filter; - cursor: $cursor-disabled; } } @@ -135,8 +132,8 @@ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown // menu with the parent. .dropdown-menu-right { - left: auto; // Reset the default from `.dropdown-menu` right: 0; + left: auto; // Reset the default from `.dropdown-menu` } // With v3, we enabled auto-flipping if you have a dropdown within a right // aligned nav component. To enable the undoing of that, we provide an override @@ -145,8 +142,8 @@ // This is only for left-aligning a dropdown menu within a `.navbar-right` or // `.pull-right` nav component. .dropdown-menu-left { - left: 0; right: auto; + left: 0; } // Dropdown section headers @@ -162,10 +159,10 @@ // Backdrop to catch body clicks on mobile, etc. .dropdown-backdrop { position: fixed; - left: 0; + top: 0; right: 0; bottom: 0; - top: 0; + left: 0; z-index: ($zindex-dropdown - 10); } @@ -184,10 +181,10 @@ .navbar-fixed-bottom .dropdown { // Reverse the caret .caret { + content: ""; border-top: 0; border-bottom: $caret-width-base dashed; border-bottom: $caret-width-base solid \9; // IE8 - content: ""; } // Different positioning for bottom up menu .dropdown-menu { diff --git a/src/pretix/static/bootstrap/scss/bootstrap/_forms.scss b/src/pretix/static/bootstrap/scss/bootstrap/_forms.scss index 11ba1096c7..d2e2bac5cd 100644 --- a/src/pretix/static/bootstrap/scss/bootstrap/_forms.scss +++ b/src/pretix/static/bootstrap/scss/bootstrap/_forms.scss @@ -8,13 +8,13 @@ // Restyle and baseline non-control form elements. fieldset { - padding: 0; - margin: 0; - border: 0; // Chrome and Firefox set a `min-width: min-content;` on fieldsets, // so we reset that to ensure it behaves more like a standard block element. // See https://github.com/twbs/bootstrap/issues/12359. min-width: 0; + padding: 0; + margin: 0; + border: 0; } legend { @@ -33,7 +33,7 @@ label { display: inline-block; max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141) margin-bottom: 5px; - font-weight: bold; + font-weight: 700; } @@ -43,9 +43,18 @@ label { // is required to ensure optimum display with or without those classes to better // address browser inconsistencies. -// Override content-box in Normalize (* isn't specific enough) input[type="search"] { + // Override content-box in Normalize (* isn't specific enough) @include box-sizing(border-box); + + // Search inputs in iOS + // + // This overrides the extra rounded corners on search inputs in iOS so that our + // `.form-control` class can properly style them. Note that this cannot simply + // be added to `.form-control` as it's not specific enough. For details, see + // https://github.com/twbs/bootstrap/issues/11586. + -webkit-appearance: none; + appearance: none; } // Position radios and checkboxes better @@ -54,6 +63,16 @@ input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; // IE8-9 line-height: normal; + + // Apply same disabled cursor tweak as for inputs + // Some special care is needed because