w3c / w3c/csswg-drafts

[css-pseudo-4] Enabling carousel design patterns in CSS

Open
#9,745 5 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-pseudo-4
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Carousels are an often used design pattern on the web. They are used in a variety of contexts, from product listing pages to slideshow like content. OpenUI has explored a range of carousel designs, showing that the specific layout and appearance can vary dramatically. They are also provided by many frameworks as components, however implementing a carousel correctly is complicated and often results in inconsistent and sometimes inaccessible implementations.

There are a variety of problems being solved by carousels, which we believe could be provided by a set of CSS features. Developers could then combine these CSS features to create the various designs. CSS-only component libraries could be built to further simplify this process.

I'd like to share a strawman set of feature proposals that enable the creation of a variety of carousel patterns out of plain HTML lists using CSS. I've put up an explainer with polyfills and demos (e.g. see the full carousel) where you can see the individual features and how they can be combined to make a full fledged CSS carousel. I'd like to introduce the problem, features and get feedback on the overall direction and where to take the discussion.

Explainer: https://github.com/flackr/carousel/

I'm adding this under css-pseudo-4 for now, but likely the features here would span css-grid-2, css-scroll-snap-2, and possibly other specs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked explainer and its polyfill and demo examples, including the full carousel example, to understand the proposed feature set and how the patterns combine. The requested outcome is feedback on the overall direction and where discussion should go, but the issue names no specific implementation or test target.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.