While ResourceLoader seems to correctly wait for JS dependencies to be loaded before firing using()'s callback, when it adds CSS to the page, all it does is create <link> elements to the head, not waiting for the CSS content to really be loaded.
Which means that something waiting for CSS dependencies sees its callback called too early, when the required CSS hasn't been loaded yet.
Symptoms in code leveraging mw.loader.using() include broken CSS flashing by (because elements are shown before their styles are applied), or even broken application logic when JS does size-dependent actions fail due to missing styles (the elements aren't the size they will be once the styles are applied).
Afaik modern browsers support the onload event on link elements, so that's probably a solution to explore. If that can't be done, an alternative is to insert a special CSS rule at the end of each CSS file served indicating that the CSS has been loaded, and waiting for that style to appear. The latter is what I'm going to attempt right now as a workaround for MultimediaViewer, which is broken (particularly in Chrome) at the moment because of this bug.
Version: 1.23.0
Severity: normal