-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Csssytledeclaration setproperty example #37285
Conversation
Funnily most examples are still broken because they assume the stylesheet is injected alone, while now the MDN styles are injected before the live sample code within the same |
@caugner Please see @Josh-Cena comment above #37285 (comment) What do you think? |
The problem is, currently there are extra rules inserted before the example code. If you want to get a handle to a certain rule, you either hardcode a weird non-0 index, or you use a |
Closing in favor of mdn/yari#12809 |
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.