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
  • Merge requests
  • !21298

Refactor carousel

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge carousel into v4-dev Dec 05, 2016
  • Overview 0
  • Commits 32
  • Pipelines 0
  • Changes 7
screen shot 2016-12-04 at 11 06 58 pm

This PR refactors the carousel to un-nest CSS selectors, simplify overall styling, and improve documentation of key features. More specifically:

  • New visuals for a simpler design. I've removed the gradients on the controls, changed the indicators from circles to squares (with larger tap areas), and added new icons.

  • Un-nest CSS. Instead of .carousel > .item and the like, we have .carousel-* prefixed on all classes (save for the .active state). This includes the slides, controls, and indicators. Fixes #18396 (closed).

  • Simply CSS for sliding effects. We added transforms later in v3's lifecycle, so we had to support transitions for position and transform. No more; now we just have 3D transforms, so our compiled CSS is much simpler.

  • More reliance on utilities. Image styles for within carousel items have been removed, so now you'll need to use utilities or custom styles (e.g., .d-block and .img-fluid). Similarly, I've included an example of responsive captions in our docs built with utilities.

  • Improved documentation. The original example is now split across a handful of examples, each building on the previous (from slides only, to controls, to indicators, to captions). Rewrites some of the intro docs and also provides better guidance on responsive captions and more.

  • Tweak JS to better handle directional states. This pulls in the JS changes from #18830 to accomplish that.

  • Fixes #17878 (closed), correcting the Carousel example.

  • Update migration docs to mention changes.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: carousel