Skip to content

Commit

Permalink
Upgrade Bootstrap to v4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trvrb committed Apr 3, 2021
1 parent 491654d commit 82e0859
Show file tree
Hide file tree
Showing 81 changed files with 2,064 additions and 989 deletions.
3 changes: 2 additions & 1 deletion css/bootstrap/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
// Expand the right padding and account for the close button's positioning.

.alert-dismissible {
padding-right: ($close-font-size + $alert-padding-x * 2);
padding-right: $close-font-size + $alert-padding-x * 2;

// Adjust close link position
.close {
position: absolute;
top: 0;
right: 0;
z-index: 2;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
Expand Down
9 changes: 8 additions & 1 deletion css/bootstrap/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
.badge {
display: inline-block;
padding: $badge-padding-y $badge-padding-x;
font-size: $badge-font-size;
@include font-size($badge-font-size);
font-weight: $badge-font-weight;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius($badge-border-radius);
@include transition($badge-transition);

@at-root a#{&} {
@include hover-focus() {
text-decoration: none;
}
}

// Empty badges collapse automatically
&:empty {
Expand Down
5 changes: 3 additions & 2 deletions css/bootstrap/_breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
@include font-size($breadcrumb-font-size);
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($breadcrumb-border-radius);
Expand All @@ -14,10 +15,10 @@
padding-left: $breadcrumb-item-padding;

&::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
float: left; // Suppress inline spacings and underlining of the separator
padding-right: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: $breadcrumb-divider;
content: escape-svg($breadcrumb-divider);
}
}

Expand Down
29 changes: 10 additions & 19 deletions css/bootstrap/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

> .btn {
position: relative;
flex: 0 1 auto;
flex: 1 1 auto;

// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover {
@include hover() {
z-index: 1;
}
&:focus,
Expand All @@ -22,14 +22,6 @@
z-index: 1;
}
}

// Prevent double borders when buttons are next to each other
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -$btn-border-width;
}
}

// Optional: Group multiple button groups together for a toolbar
Expand All @@ -44,8 +36,10 @@
}

.btn-group {
> .btn:first-child {
margin-left: 0;
// Prevent double borders when buttons are next to each other
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-left: -$btn-border-width;
}

// Reset rounded corners
Expand Down Expand Up @@ -119,17 +113,14 @@
align-items: flex-start;
justify-content: center;

.btn,
.btn-group {
> .btn,
> .btn-group {
width: 100%;
}

> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: -$btn-border-width;
margin-left: 0;
}

// Reset rounded corners
Expand Down
39 changes: 19 additions & 20 deletions css/bootstrap/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@

.btn {
display: inline-block;
font-family: $btn-font-family;
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
white-space: nowrap;
text-decoration: if($link-decoration == none, null, none);
white-space: $btn-white-space;
vertical-align: middle;
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-line-height, $btn-border-radius);
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);

// Share hover and focus styles
@include hover-focus {
@include hover() {
color: $body-color;
text-decoration: none;
}

Expand All @@ -33,17 +37,16 @@
@include box-shadow(none);
}

// Opinionated: add "hand" cursor to non-disabled .btn elements
&:not(:disabled):not(.disabled) {
cursor: pointer;
}
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);

&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active {
@include box-shadow($btn-active-box-shadow);
&:active,
&.active {
@include box-shadow($btn-active-box-shadow);

&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
}
}
Expand Down Expand Up @@ -80,20 +83,16 @@ fieldset:disabled a.btn {
.btn-link {
font-weight: $font-weight-normal;
color: $link-color;
background-color: transparent;
text-decoration: $link-decoration;

@include hover {
@include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
background-color: transparent;
border-color: transparent;
}

&:focus,
&.focus {
text-decoration: $link-hover-decoration;
border-color: transparent;
box-shadow: none;
}

&:disabled,
Expand All @@ -111,11 +110,11 @@ fieldset:disabled a.btn {
//

.btn-lg {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
}

.btn-sm {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
}


Expand Down
Loading

0 comments on commit 82e0859

Please sign in to comment.