Code sample should use @property rule instead of JavaScript

Open Beginner friendly
#46,626 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
css, javascript, markdown
Domain
documentation

Research direction

The sample lives in files/en-us/web/api/css_properties_and_values_api/guide/index.md in the mdn/content repository, under the section 'Using registered custom properties'. Find the JavaScript CSS.registerProperty() snippet there and replace it with an equivalent @property rule block, keeping the surrounding prose consistent. Done when the page shows the @property version and the explanatory text still matches the code.

Written by the indexing model from the issue text.

Description

Content:WebAPI needs info
MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/CSS_Properties_and_Values_API/guide

What specific section or headline is this issue about?

Using registered custom properties

What information was incorrect, unhelpful, or incomplete?

The sample uses JavaScript to register the property. I think it would be more appropriate to use the @property rule.

What did you expect to see?

I had expected this section to use the @property rule to register the property.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

I’m happy to make changes myself if it’s appropriate.

MDN metadata
Page report details
Dominant language
Markdown
Stars
11.2k
Forks
23.3k
Avg merge
2d 6h
Merged PRs (30d)
173

Getting set up

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.

More from mdn/content

All issues in mdn/content

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.