https://bugzilla.wikimedia.org/show_bug.cgi?id=38630
--- Comment #4 from Krinkle <[email protected]> 2012-09-04 04:20:50 UTC --- (In reply to comment #3) > It's not exactly a placeholder. And it's tricky to do. But one of the things I > contemplated before was inserting an id, name, or class onto the stylesheet > tag > that comes before the spot we want to add dynamic stylesheets to. After that > we'd probably do something like looking that node up on page load. And > whenever > a dynamic style is inserted we would record it so we know what element we now > want to insert after. That wouldn't work always since it is a marker used for both directions. Some stuff goes before, some stuff goes after. And when the page is first loaded (depending on the site configuration and the logged-in user), it could be that neither exists yet or only one of the two kinds of stylesheets. The marker is currently put between regular modules and site/user modules. The latter of which always needs to be cascade last. This works since browsers honor the order in the DOM as the cascading order (not the order in which things are inserted per se). Using a stylesheet itself as a marker is smart, though we need to cover for all both scenarios (having a marker on a regular stylesheet or a site/user one). And then keep a reference to that and if the marker is of the other user-kind, insert before, and if a regular one insert after and update the marker reference. If there's neither, it isn't a problem since then the first dynamic stylesheet becomes the marker and it goes from there. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
