https://bugzilla.wikimedia.org/show_bug.cgi?id=29693
--- Comment #10 from Roan Kattouw <[email protected]> 2012-09-24 16:58:52 UTC --- (In reply to comment #9) > Why does RL load gadget's CSS twice? One time it ships CSS with JavaScript and > writing this into the DOM and one time CSS is delivered in a separate CSS file > duplicating the style definitions. You can easily see it opening Firebug on > Wikimedia Commons and inspecting an element that was created by one of our > Gadgets that both consist of a JavaScript and CSS (e.g. the slideshow start > button) > This behavior was apparently introduced in November 2011 to make Gadget CSS load on time. > * Is this intended behaviour? Ideally the CSS wouldn't be loaded twice, no. The reason it's currently done is to work around the fact that you can't currently set the position=top property on a Gadget to make it load before the page renders. > * Is this documented (except in your source files that I can't search any more > since Krinkle's SVN search is down)? No. > * Are there intentions to optimise this issue? The rewrite of the Gadgets extension in the RL2 branch fixes this by only bundling the CSS with the JS, rather than loading it separately. This does mean that, unless position=top is set in the Gadget properties, the CSS will load after the page renders, right before the JS executes. This is fine if you're only styling things that your JS creates, but it's ugly if you're styling things that MediaWiki puts on the page. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
