w3c / w3c/csswg-drafts

Proposal: make a consistent "list" syntax in CSS, and list of lists syntax in CSS.

Open
#12,802 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Commenter Response Pending css-mixins-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Description

In this post that I wrote up a little while back, I talked about "The Many Failed Attempts at Lists-of-Lists Syntax in CSS". Right now, CSS is scattered with various attempts to syntactically define "lists-of-lists" syntax, and the recent CSS Functions and Mixins module is currently on-track to introduce another lists-in-lists syntax attempt, which, via the use of curly-braces, rolls back previous understanding of list syntax, where curly braces, by convention, only held declaration lists.

I don't have a specific proposal for what lists-of-lists syntax should look like; I just think it's worth CSSWG exploring a single CSS syntax to represent it, and to:

  1. use a consistent list syntax and lists-of-lists syntax moving forward, and
  2. backporting, as needed, list syntax and lists-of-lists syntax to previous lists-of-lists syntax attempts, for consistency

If I had a preference, it would be:

  1. curly braces only hold declaration lists, or
  2. curly braces are used everywhere there are lists-of-lists, or
  3. a previous lists-of-lists syntax is used for new proposals, or
  4. a new lists-of-lists syntax is applied that is used for new proposals and backported to previous syntax

In other words, my preference for CSS would just be consistency.

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

Start with the linked post and the current CSS Functions and Mixins module discussion. Compare the existing list and lists-of-lists syntax conventions described there, then summarize possible consistency directions for CSSWG review. Done means the working group has selected or clearly documented a consistent syntax direction and its compatibility implications.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.