From d0a7707dd4dc9140889ad2b03a55e9a15b33e3d9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 22 Dec 2016 14:30:05 -0800 Subject: [PATCH 1/5] start small--set flex instead of block for active items --- scss/_carousel.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/_carousel.scss b/scss/_carousel.scss index 7949e1564c62..01ad613e0ff3 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -24,7 +24,7 @@ .carousel-item.active, .carousel-item-next, .carousel-item-prev { - display: block; + display: flex; } .carousel-item-next, From c9285ab4296af309fa5b5dd6c41df6d8be7aa285 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 22 Dec 2016 14:31:33 -0800 Subject: [PATCH 2/5] flexbox powered indicators This revamps the indicators to use flexbox instead of inline-block for added flexbility (hah). Indicators now automatically scale based on the number of elements present, and max out at the `$carousel-indicator-width` instead of always being that wide. --- scss/_carousel.scss | 8 ++++++-- scss/_variables.scss | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scss/_carousel.scss b/scss/_carousel.scss index 01ad613e0ff3..18286b539fdc 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -121,6 +121,8 @@ bottom: 10px; left: 0; z-index: 15; + display: flex; + justify-content: center; padding-left: 0; // override