Hi..of course I'm new to CSS.. I have imported a style sheet and now I want to print all of the rules.
For NON-imported styles I use this..
document.write(document.styleSheets[0].cssRules[0].cssText)
and it nicely prints out the style. However , the second style sheet comes from an import so
document.write(document.styleSheets[1].cssRules[0].cssText)
just prints out
@import url( http://www.bedbathandbeyond/css/newmain.css);
How do I see the styles in the import? I tried to use ownerRule and parentStyleSheet but neither worked. Below are failed attempts. I'm using Firefox- Help please!
document.styleSheets[0].parentStyleSheet.cssRules[0].cssText
document.styleSheets[0].ownerRule.cssText
document.styleSheets[0].ownerRule[0].cssText
|