Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #18396
Closed
Open
Issue created Dec 01, 2015 by Administrator@rootContributor

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 be carousel-control-left and carousel-control-right? Following the pattern could (should?) enable a clearer structure for the carousel-controls altogether (see: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_carousel.scss#L89).
    • The .left and .right classes are also trigger to animate carousel-item transitions. Not sure if these should be made into verbs? As in .sliding.left or something similar, like collapsing is.
  • Same for .icon-next and .icon-prev: they look like utility classes, but are are exclusive to the carousel component. Would carousel-icon carousel-icon-left/right or just .carousel-icon-left and .carousel-icon-right serve the purpose better?

Opinions?

Assignee
Assign to
Time tracking