const ruleList = document.styleSheets[0].cssRules;
for (let i = 0; i < ruleList.length; i++) {
processRule(ruleList[i]);
}CSSStyleSheet: cssRules property / notebook
CSSStyleSheet: cssRules property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const ruleList = document.styleSheets[0].cssRules;
for (const rule of ruleList) {
processRule(rule);
}