mdn / mdn/data

Split css/syntaxes.json into several files

Open
#42 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

idle
Dominant language
JavaScript
Stars
787
Forks
216
Avg merge
1d 5h
Merged PRs (30d)
6

Description

Currently css/syntaxes.json contains syntaxes for values, selectors and at-rules. The problem is each type of syntax have its own grammar.

Note that the values related to at-rules are also syntaxes, and are even shared among at-rules and properties in some cases.

I talk about syntaxes that use non CSS Values and Units Module grammar, in particular:

  • an-plus-b
  • feature-type
  • feature-value-block
  • feature-value-declaration
  • general-enclosed
  • keyframe-block
  • mf-plain
  • mf-range
  • page-body
  • page-margin-box
  • page-margin-box-type
  • pseudo-page
  • var

Suggestion is split css/syntax.json into three dictionaries, e.g. css/syntax-value.json, css/syntax-atrule.json and css/syntax-selector.json. As an alternative, format of css/at-rule.json and css/selectors.json can be change to host syntaxes too. And css/at-rule.json is already contain some syntaxes with description.

(based on #8)

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 by reading css/syntaxes.json, then compare css/at-rule.json and css/selectors.json, which the issue identifies as possible homes for syntax definitions. Determine which organization best preserves the listed grammar categories and shared at-rule/property syntaxes; the work is done when the agreed structure separates or hosts these definitions without losing the existing entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.