Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Csssytledeclaration setproperty example #37285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hamishwillee
Copy link
Collaborator

Fixes #37268

The example assumed that the CSS it needs to fetch is the second in the page, but the example is rendered in a constructed frame where the example style is the first style definition (or 0th in array).

This fixes the example to work. Note that the first commit is pure layout/template update changes. Only the second commit needs to be reviewed for this.

@hamishwillee hamishwillee requested a review from a team as a code owner December 20, 2024 00:41
@hamishwillee hamishwillee requested review from wbamberg and removed request for a team December 20, 2024 00:41
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Dec 20, 2024
Copy link
Contributor

- : A string containing the new property value. If not specified, treated as the empty string.
A [`null`](/en-US/docs/Web/JavaScript/Reference/Operators/null) value is treated the same as the empty string (`""`).

> [!NOTE] > `value` must not contain `"!important"`, that should be set using the `priority` parameter.
Copy link
Collaborator

@wbamberg wbamberg Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new improved note format doesn't work when the content starts with a backtick and Prettier "fixes" this by adding ">" to the start of the content, which looks like mangled markup. You can fix this either by not updating to the new format, or by doing something like "The value parameter".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example for CSSStyleDeclaration/setProperty doesn't work
2 participants