(There was no bug yet for "addModuleStyles should support dependencies" - which I've commonly said is WONTFIX, so I'll put it here so I can refer to it)
Just semantics, but there is no case of ResourceLoader not being able to handle skin css dependencies. It is impossible by design due to restrictions outside ResourceLoader.
Some of these restrictions are:
- page html must not be required to change for things not to break, cached page html must continue to work. This means:
2a) version can't be in page html, 2b) This can't work because if a dependency is added or things moved into a lower-level module, then all existing page cache will be broken as it would now have a <link> that soon generates an incomplete stylesheet where a dependency is missing.
Possible solutions involve ESI, which is fine for enhancement (we can make the <link> tag contain a version number that way for better caching), but we don't want to depend on it for proper functionality, which means we can't have it replace dependencies.
Alternatively (current practice) you can continue the convention that one *should not* use addModuleStyles for anything other than the core basic css (which must not have dependencies or concerns about module order).
- bug 45229