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
.leftand.right. Following the common naming pattern of Bootstrap, shouldn't these becarousel-control-leftandcarousel-control-right? Following the pattern could (should?) enable a clearer structure for thecarousel-controlsaltogether (see: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_carousel.scss#L89).- The
.leftand.rightclasses are also trigger to animatecarousel-itemtransitions. Not sure if these should be made into verbs? As in.sliding.leftor something similar, likecollapsingis.
- The
- Same for
.icon-nextand.icon-prev: they look like utility classes, but are are exclusive to thecarouselcomponent. Wouldcarousel-icon carousel-icon-left/rightor just.carousel-icon-leftand.carousel-icon-rightserve the purpose better?
Opinions?