Skip to content

Commit

Permalink
feat(carousel)[WIP]: fake disabled state
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Dec 17, 2020
1 parent 5d4b74d commit ef91b08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 10 additions & 2 deletions scss/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background: rgba($carousel-indicator-active-bg, .5) escape-svg($carousel-control-prev-icon-bg) no-repeat subtract(50%, $spacer / 10) 50% / #{$carousel-control-icon-size $carousel-control-icon-size}; // Boosted mod
background: rgba($carousel-indicator-active-bg, .5) escape-svg($carousel-control-icon-bg) no-repeat subtract(50%, $spacer / 10) 50% / #{$carousel-control-icon-size $carousel-control-icon-size}; // Boosted mod
@include border-radius(50%, 50%);
}

Expand All @@ -151,7 +151,7 @@
.carousel-control-next:hover .carousel-control-next-icon,
.carousel-control-next:focus .carousel-control-next-icon {
background-color: $carousel-indicator-active-bg;
filter: $carousel-dark-control-icon-filter;
filter: $carousel-control-icon-filter;
}

.carousel-control-prev:active .carousel-control-prev-icon,
Expand All @@ -160,6 +160,14 @@
filter: none;
}

//// Fake disabled state
.carousel.done .carousel-control-next {
pointer-events: none;

.carousel-control-next-icon {
background-image: escape-svg($carousel-control-icon-disabled-bg);
}
}
// End mod

// Optional indicator pips
Expand Down
12 changes: 7 additions & 5 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1385,16 +1385,18 @@ $carousel-caption-padding-x: $spacer !default; // Boosted mod
$carousel-caption-spacer: $spacer * 3 !default;

$carousel-control-icon-width: 2.5rem !default;
$carousel-control-icon-size: 1.5rem !default; // Boosted mod
$carousel-control-icon-active-bg: $component-active-bg !default; // Boosted mod

$carousel-control-prev-icon-bg: $chevron-icon !default;
// Boosted mod
$carousel-control-icon-size: 1.5rem !default;
$carousel-control-icon-active-bg: $component-active-bg !default;
$carousel-control-icon-bg: $chevron-icon !default;
$carousel-control-icon-disabled-bg: $chevron-icon-disabled !default;
$carousel-control-icon-filter: $invert-filter !default;
// End mod

$carousel-transition-duration: .6s !default;
$carousel-transition: transform $carousel-transition-duration $transition-timing !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)

// Boosted mod: no dark carousel
$carousel-dark-control-icon-filter: invert(1) !default;


// Spinners
Expand Down

0 comments on commit ef91b08

Please sign in to comment.