I have to access CSS class by name, and the code below works. However if I try hui[\"myclass\"] or hui[\".myclass\"] instead of hui[0]
hui[\"myclass\"]
hui[\".myclass\"]
hui[0]
(document.styleSheets[0].cssRules || document.styleSheets[0].rules)[0].style.color = '#ff0000' should work.
(document.styleSheets[0].cssRules || document.styleSheets[0].rules)[0].style.color = '#ff0000'
Quirksmode CSSOM (DOM CSS) compatibility table