New issue
Advanced search Search tips

Issue 865976 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

StyleSheet returns wrong cssRules

Reported by dexiang...@gmail.com, Jul 20

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3409.0 Safari/537.36

Steps to reproduce the problem:
1. open https://en.wikipedia.org/wiki/.NET_Framework
2. check document.styleSheets[0].cssRules in console
3. check real css rules in https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.cite.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Cwikibase.client.init&only=styles&skin=vector

What is the expected behavior?
The property of cssRules must have the exact css rules of target style sheet

What went wrong?
--

Did this work before? N/A 

Chrome version: 68.0.3409.0  Channel: n/a
OS Version: 10.0
Flash Version:
 
Chrome seems to be properly implementing the specification.
As well as Firefox.

https://drafts.csswg.org/cssom/#cssrule
https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule

The specification says CSSStyleRule#cssText is a representation (serialization) of the rule. And a rule is created from the source text by parsing it so the result contains only the recognized and supported properties, not everything present in the source. The aliased properties (e.g. -webkit-user-select) are resolved to their targets (e.g. user-select).
Labels: Needs-Triage-M68
Components: -Blink Blink>CSS
Status: WontFix (was: Unconfirmed)
Closing as per comment 1.

Sign in to add a comment