https://bugzilla.wikimedia.org/show_bug.cgi?id=52718
--- Comment #1 from Daniel Friesen <[email protected]> --- I could swear that there was already a bug for this, but I can't for the life of me find it. - bug 34904 is relevant. - also related, bug 29693 - When you do load using both addModules and addModuleStyles CSS is double-loaded since the JS can't understand the css is already in the page. Btw, just to add insult to injury; bug 45229, addModuleStyles may sort modules alphabetically. So you can load your css via addModules and have it show up in order but not work for users without JS. Or your can load your css via addModuleStyles and have it show up for users without JS but take a chance that the addModuleStyles may screw up the load order potentially breaking your css (in addition to completely excluding yourself from the ability to have dependencies). The solution for these issues I've been thinking of is: - Add something like a data-modules attribute to styles added server-side so that the JS loader can understand what css has already been loaded. - Add a new RL key to mark modules whose css should be loaded directly via <link> rather than using JS. We can then deprecate addModule{Scripts,Styles} - Start doing minimal dependency handling on the server so that when you mark a module to be loaded server side, css for modules it depends on (at least the ones that also say should be loaded server side) will actually be loaded instead of loaded by JS. -- 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
