Skip to content
This repository was archived by the owner on Aug 21, 2026. It is now read-only.

Fixed CSS rule insertion - #31

Open
jiripudil wants to merge 1 commit into
vojtech-dobes:masterfrom
jiripudil:fix/css-insertion
Open

Fixed CSS rule insertion#31
jiripudil wants to merge 1 commit into
vojtech-dobes:masterfrom
jiripudil:fix/css-insertion

Conversation

@jiripudil

Copy link
Copy Markdown

Trying to prepend a CSS rule before @charset and/or @import rules results in an uncaught HierarchyRequestError. According to the specs, nothing can precede these two types of rules. I find the first non-import non-charset rule and insert at that offset. Could somebody please test this on IE < 9?

btw what's the reason behind prepending the rule? Couldn't it just be inserted at cssRules.length offset? It would make this whole thing much simpler :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant