[csswg-drafts] [cssom-1] Clarify if CSS rules are a reference to `CSSStyleSheet.rules` (or not) (#6994)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-1] Clarify if CSS rules are a reference to `CSSStyleSheet.rules` (or not) ==
```js
const styleSheet = new CSSStyleSheet()
const { cssRules } = styleSheet

styleSheet.replaceSync('div { color: red }')

console.log(cssRules === styleSheet.cssRules)
// Chrome: true
// Firefox: false
```

> Set sheet’s CSS rules to rules.

https://drafts.csswg.org/cssom/#dom-cssstylesheet-replace
https://drafts.csswg.org/cssom/#synchronously-replace-the-rules-of-a-cssstylesheet

> **CSS rules:** The CSS rules associated with the CSS style sheet.

https://drafts.csswg.org/cssom/#concept-css-style-sheet-css-rules

It is not clear if **CSS rules** should be a reference to `CSSStyleSheet.cssRules`, ie. a `CSSRuleList`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6994 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 27 January 2022 06:49:37 UTC