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

Update: (Fixes #807) Bootstrap to 8f7bd41 (v4.1.0) #808

Merged
merged 1 commit into from
Apr 18, 2018
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
6,119 changes: 3,075 additions & 3,044 deletions packages/clay/src/js/bootstrap.js

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions packages/clay/src/scss/bootstrap/_breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
margin-bottom: $breadcrumb-margin-bottom;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($border-radius);
@include border-radius($breadcrumb-border-radius);
}

.breadcrumb-item {
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
padding-right: $breadcrumb-item-padding;
+ .breadcrumb-item {
padding-left: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: "#{$breadcrumb-divider}";

&::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
padding-right: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: $breadcrumb-divider;
}
}

// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
Expand Down
8 changes: 7 additions & 1 deletion packages/clay/src/scss/bootstrap/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;

&::after {
&::after,
.dropup &::after,
.dropright &::after {
margin-left: 0;
}

.dropleft &::before {
margin-right: 0;
}
}

.btn-sm + .dropdown-toggle-split {
Expand Down
1 change: 1 addition & 0 deletions packages/clay/src/scss/bootstrap/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ fieldset:disabled a.btn {
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
pointer-events: none;
}

// No need for an active state here
Expand Down
35 changes: 33 additions & 2 deletions packages/clay/src/scss/bootstrap/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@

.card {
display: flex;
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
flex-direction: column;
margin-right: $card-deck-margin;
Expand Down Expand Up @@ -183,7 +183,7 @@
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
margin-bottom: 0;

Expand Down Expand Up @@ -261,10 +261,41 @@
@include media-breakpoint-up(sm) {
column-count: $card-columns-count;
column-gap: $card-columns-gap;
orphans: 1;
widows: 1;

.card {
display: inline-block; // Don't let them vertically span multiple columns
width: 100%; // Don't let their width change
}
}
}


//
// Accordion
//

.accordion {
.card:not(:first-of-type):not(:last-of-type) {
border-bottom: 0;
border-radius: 0;
}

.card:not(:first-of-type) {
.card-header:first-child {
border-radius: 0;
}
}

.card:first-of-type {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}

.card:last-of-type {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
52 changes: 48 additions & 4 deletions packages/clay/src/scss/bootstrap/_carousel.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
// Wrapper for the slide container and indicators
// Notes on the classes:
//
// 1. The .carousel-item-left and .carousel-item-right is used to indicate where
// the active slide is heading.
// 2. .active.carousel-item is the current slide.
// 3. .active.carousel-item-left and .active.carousel-item-right is the current
// slide in its in-transition state. Only one of these occurs at a time.
// 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
// is the upcoming slide in transition.

.carousel {
position: relative;
}
Expand Down Expand Up @@ -31,7 +40,6 @@
top: 0;
}

// CSS3 transforms when supported by the browser
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
transform: translateX(0);
Expand Down Expand Up @@ -60,6 +68,42 @@
}


//
// Alternate transitions
//

.carousel-fade {
.carousel-item {
opacity: 0;
transition-duration: .6s;
transition-property: opacity;
}

.carousel-item.active,
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
opacity: 1;
}

.active.carousel-item-left,
.active.carousel-item-right {
opacity: 0;
}

.carousel-item-next,
.carousel-item-prev,
.carousel-item.active,
.active.carousel-item-left,
.active.carousel-item-prev {
transform: translateX(0);

@supports (transform-style: preserve-3d) {
transform: translate3d(0, 0, 0);
}
}
}


//
// Left/right controls for nav
//
Expand Down Expand Up @@ -91,13 +135,13 @@
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
}

Expand Down
129 changes: 126 additions & 3 deletions packages/clay/src/scss/bootstrap/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
// Select
//
// Replaces the browser default select with a custom one, mostly pulled from
// http://primercss.io.
// https://primer.github.io/.
//

.custom-select {
Expand Down Expand Up @@ -247,11 +247,11 @@
margin: 0;
opacity: 0;

&:focus ~ .custom-file-control {
&:focus ~ .custom-file-label {
border-color: $custom-file-focus-border-color;
box-shadow: $custom-file-focus-box-shadow;

&::before {
&::after {
border-color: $custom-file-focus-border-color;
}
}
Expand Down Expand Up @@ -295,3 +295,126 @@
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
}
}

// Range
//
// Style range inputs the same across browsers. Vendor-specific rules for psuedo
// elements cannot be mixed. As such, there are no shared styles for focus or
// active states on prefixed selectors.

.custom-range {
width: 100%;
padding-left: 0; // Firefox specific
background-color: transparent;
appearance: none;

&:focus {
outline: none;
}

&::-moz-focus-outer {
border: 0;
}

&::-webkit-slider-thumb {
width: $custom-range-thumb-width;
height: $custom-range-thumb-height;
margin-top: -($custom-range-thumb-width * .25); // Webkit specific?
@include gradient-bg($custom-range-thumb-bg);
border: $custom-range-thumb-border;
@include border-radius($custom-range-thumb-border-radius);
@include box-shadow($custom-range-thumb-box-shadow);
appearance: none;

&:focus {
outline: none;
box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
}

&:active {
@include gradient-bg($custom-range-thumb-active-bg);
}
}

&::-webkit-slider-runnable-track {
width: $custom-range-track-width;
height: $custom-range-track-height;
color: transparent; // Why?
cursor: $custom-range-track-cursor;
background-color: $custom-range-track-bg;
border-color: transparent;
@include border-radius($custom-range-track-border-radius);
@include box-shadow($custom-range-track-box-shadow);
}

&::-moz-range-thumb {
width: $custom-range-thumb-width;
height: $custom-range-thumb-height;
@include gradient-bg($custom-range-thumb-bg);
border: $custom-range-thumb-border;
@include border-radius($custom-range-thumb-border-radius);
@include box-shadow($custom-range-thumb-box-shadow);
appearance: none;

&:focus {
outline: none;
box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
}

&:active {
@include gradient-bg($custom-range-thumb-active-bg);
}
}

&::-moz-range-track {
width: $custom-range-track-width;
height: $custom-range-track-height;
color: transparent;
cursor: $custom-range-track-cursor;
background-color: $custom-range-track-bg;
border-color: transparent; // Firefox specific?
@include border-radius($custom-range-track-border-radius);
@include box-shadow($custom-range-track-box-shadow);
}

&::-ms-thumb {
width: $custom-range-thumb-width;
height: $custom-range-thumb-height;
@include gradient-bg($custom-range-thumb-bg);
border: $custom-range-thumb-border;
@include border-radius($custom-range-thumb-border-radius);
@include box-shadow($custom-range-thumb-box-shadow);
appearance: none;

&:focus {
outline: none;
box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
}

&:active {
@include gradient-bg($custom-range-thumb-active-bg);
}
}

&::-ms-track {
width: $custom-range-track-width;
height: $custom-range-track-height;
color: transparent;
cursor: $custom-range-track-cursor;
background-color: transparent;
border-color: transparent;
border-width: ($custom-range-thumb-height * .5);
@include box-shadow($custom-range-track-box-shadow);
}

&::-ms-fill-lower {
background-color: $custom-range-track-bg;
@include border-radius($custom-range-track-border-radius);
}

&::-ms-fill-upper {
margin-right: 15px; // arbitrary?
background-color: $custom-range-track-bg;
@include border-radius($custom-range-track-border-radius);
}
}
Loading