Consider clarifying some of the carousel classes (right, left, icon-*)
Created by: petetnt
Similar to #18390 (closed), one thing that has bothered me for a long while are some of the Carousel-components classes:
The example from http://v4-alpha.getbootstrap.com/components/carousel/#example:
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="First slide">
</div>
<div class="carousel-item">
<img data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt="Second slide">
</div>
<div class="carousel-item">
<img data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt="Third slide">
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
- The carousel-controls have utility class looking classes called
.left
and.right
. Following the common naming pattern of Bootstrap, shouldn't these becarousel-control-left
andcarousel-control-right
? Following the pattern could (should?) enable a clearer structure for thecarousel-controls
altogether (see: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_carousel.scss#L89).- The
.left
and.right
classes are also trigger to animatecarousel-item
transitions. Not sure if these should be made into verbs? As in.sliding.left
or something similar, likecollapsing
is.
- The
- Same for
.icon-next
and.icon-prev
: they look like utility classes, but are are exclusive to thecarousel
component. Wouldcarousel-icon carousel-icon-left/right
or just.carousel-icon-left
and.carousel-icon-right
serve the purpose better?
Opinions?