Closed
Bug 292083
Opened 19 years ago
Closed 19 years ago
CSS stylesheet rules not accessible in DOM when called with @import
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: knocte, Unassigned)
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050321 Firefox/1.0.2 It seems that a stylesheet is not accessible through DOM when loaded via @import rule. It is correctly loaded via style/link tags because I can access a class's value. I will provide a testcase. Reproducible: Always Steps to Reproduce: (Testcase attached) I think this is an important feature related to W3C CSS/JS standards.
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
Reporter | ||
Comment 3•19 years ago
|
||
This bug is also present in Mozilla 1.8b (Gecko/20050217).
Reporter | ||
Comment 4•19 years ago
|
||
Tested on Linux: changing OS to ALL. Changing component from DOM:Core to DOM:CSSOM.
Component: DOM → DOM: CSSOM
OS: Windows XP → All
Summary: CSS stylesheet not accessible in DOM when called with @import → CSS stylesheet rules not accessible in DOM when called with @import
Comment 5•19 years ago
|
||
The behavior is correct. The imported sheet is not in document.styleSheets, since it's not directly linked to from the document. It _is_, however, accessible as document.styleSheets[0].cssRules[0].styleSheet (the .styleSheet property of the DOMCSSImportRule object). I suggest reading the W3C DOM CSS spec, which covers all this.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 6•19 years ago
|
||
Thanks for reviewing. Sorry for submitting this invalid bug (I had doubts about it, but didn't check on the spec).
You need to log in
before you can comment on or make changes to this bug.
Description
•