mdn / mdn/browser-compat-data

Normalize references to CSS data types in feature object

Open
#6,349 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

data:css idle
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

I was going through a lot of compatibility table for CSS properties today. And I realised that there are no standard way of referencing a CSS data type from the feature object

Looking at the CSS Types page on MDN it seems that the convention is to have the name of the type between angle brackets. We lack that consistency in the compatibility data and that leads to inconsistencies

The following files both reference differently

  • css/properties/word-spacing percentage is pluralised
  • css/properties/font-stretch percentage is singular
  • css/properties/opacity percentage is pluralised but has a different description

Normalizing this would help us having a consistent keys in the feature object, a consistent name, description and mdn_url
That information usually exists within the MDN page, so why not on the compatibility table too?

It seems that the JSON schema prevents us from using angle brackets < and > in the key, that could potentially be quite a big change to make

Wanted to gather everyone's ideas around this matter. Keen to hear your thoughts and start drafting what the next steps would be

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 examples in css/properties/word-spacing, css/properties/font-stretch, and css/properties/opacity, then inspect the JSON schema constraints mentioned in the issue. The issue is still seeking agreement on the convention, so completion would require an agreed representation, compatible schema changes, and consistent feature-object metadata across the affected references.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, json
Domain
data, web-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.