Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Appending a rule to the last CSS stylesheet (using JS)
var styleSheets = document.styleSheets;
var lastStyleSheet = styleSheets[styleSheets.length - 1];
lastStyleSheet.insertRule(
"selector {prop: val}", lastStyleSheet.cssRules.length
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.