Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade bootstrap to 4.0.0-beta2 #2310

Merged
merged 1 commit into from
Oct 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,103 changes: 1,561 additions & 1,542 deletions backend/vendor/assets/javascripts/solidus_admin/bootstrap.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

.alert {
position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
Expand All @@ -28,9 +29,9 @@
.alert-dismissible {
// Adjust close link position
.close {
position: relative;
top: -$alert-padding-y;
right: -$alert-padding-x;
position: absolute;
top: 0;
right: 0;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
font-size: $badge-font-size;
font-weight: $badge-font-weight;
line-height: 1;
color: $badge-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius();
@include border-radius($badge-border-radius);

// Empty badges collapse automatically
&:empty {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: 1rem;
margin-bottom: $breadcrumb-margin-bottom;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($border-radius);
@include clearfix;
}

.breadcrumb-item {
float: left;

// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
Expand All @@ -28,6 +27,7 @@
+ .breadcrumb-item:hover::before {
text-decoration: underline;
}
// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement
// stylelint-disable selector-no-qualifying-type

// Make the div behave like a button
.btn-group,
Expand All @@ -10,7 +10,6 @@
> .btn {
position: relative;
flex: 0 1 auto;
margin-bottom: 0;

// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
Expand Down Expand Up @@ -48,33 +47,39 @@
border-radius: 0;
}

// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
// Set corners individual because sometimes a single button can be in a .btn-group
// and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;

&:not(:last-child):not(.dropdown-toggle) {
@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 a .dropdown-menu
// immediately after it
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
@include border-left-radius(0);
}

// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
// Custom edits for including btn-groups within btn-groups (useful for including
// dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}

.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}

.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:not(:first-child) > .btn:first-child {
@include border-left-radius(0);
}
Expand Down Expand Up @@ -129,7 +134,6 @@
//

.btn-group-vertical {
display: inline-flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
Expand All @@ -146,31 +150,36 @@
margin-top: -$input-btn-border-width;
margin-left: 0;
}
}

.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) {
> .btn {
&:not(:first-child):not(:last-child) {
border-radius: 0;
}

&:first-child:not(:last-child) {
@include border-bottom-radius(0);
}

&:last-child:not(:first-child) {
@include border-top-radius(0);
}
}

> .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
&:first-child:not(:last-child) {
@include border-bottom-radius(0);

> .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
@include border-bottom-radius(0);
}
}
&:last-child:not(:first-child) {

> .btn-group:last-child:not(:first-child) > .btn:first-child {
@include border-top-radius(0);
}
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
@include border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
@include border-top-radius(0);
}


// Checkbox and radio options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement
// stylelint-disable selector-no-qualifying-type

//
// Base styles
Expand All @@ -22,7 +22,7 @@
&:focus,
&.focus {
outline: 0;
box-shadow: $btn-focus-box-shadow;
box-shadow: $input-btn-focus-box-shadow;
}

// Disabled comes first so active can properly restyle
Expand All @@ -32,10 +32,10 @@
@include box-shadow(none);
}

&:active,
&.active {
&:not([disabled]):not(.disabled):active,
&:not([disabled]):not(.disabled).active {
background-image: none;
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
@include box-shadow($input-btn-focus-box-shadow, $btn-active-box-shadow);
}
}

Expand All @@ -58,7 +58,11 @@ fieldset[disabled] a.btn {

@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value, #fff);
@if $color == "light" {
@include button-outline-variant($value, $gray-900);
} @else {
@include button-outline-variant($value, $white);
}
}
}

Expand All @@ -71,36 +75,27 @@ fieldset[disabled] a.btn {
.btn-link {
font-weight: $font-weight-normal;
color: $link-color;
border-radius: 0;
background-color: transparent;

&,
&:active,
&.active,
&:disabled {
@include hover {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
background-color: transparent;
@include box-shadow(none);
border-color: transparent;
}
&,

&:focus,
&:active {
&.focus {
border-color: transparent;
box-shadow: none;
}
@include hover {
border-color: transparent;
}
@include hover-focus {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
background-color: transparent;
}
&:disabled {
color: $btn-link-disabled-color;

@include hover-focus {
text-decoration: none;
}
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
}

// No need for an active state here
}


Expand All @@ -109,11 +104,11 @@ fieldset[disabled] a.btn {
//

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

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


Expand Down
Loading