Last modified: 2014-06-06 04:27:01 UTC
Sometime around 1.19, gadgets switched to loading CSS via RL. This broke some stuff on Wikinews, as gadgets that @import'ed their css from 'pedia broke, since RL made it so the @import statement was not at very top of file. Resource loader should re-order the @import statement in a module so its at the very top of a combined css file.
*** This bug has been marked as a duplicate of bug 34669 ***
When ResourceLoader loads a module it requests it from load.php and gets a set of javascript executables, a set of CSS strings (not 1 long string). And then it inserts them into the document with <style> elements. Separate style elements for each original css string. So @import will work fine. However recently in trunk (1.20svn) this <style> element generation was changes to instead use 1 long <style> element, but that broke @import (bug 34669). However since this is on enwikinews, that can't be the problem. From our IRC convo, the problem is that the css you referred to wasn't loaded by the ResouceLoader client (mw.loader), but from load.php directly with an only=styles argument. only=styles means it is not allowed to use dynamic injection, but only pure CSS. This methods should never be used for more than 1 module because it means @import rules will end up somewhere in the middle. Similar to bug 34669, there is no good solution because changing the location of the @import rule will change the cascading nature, they simply must not be merged into 1 stylesheet. They have to be separate. load.php with only=styles directly in the HTML should be very rarely used. Only for fairly static modules that need to work without javascript. And even then not with multiple modules combined (unless it can be absolutely sure that @import is not used such as mediawiki core's skin+screen+print stylesheet). I think this is a bug in the gadget extension that incorrectly is putting modules in the top <link> queue
I see no problem here: Gadgets won't load modules via RL unless you tell it to. If your gadget is not RL-compatible, either fix it or don't use RL.