Currently to load a CSS file for an extension there are three options:
- use OutputPage::addModuleStyles - does not cache, so has to be included on each page, if needed or not
- use ParserOutput::addModules - does not work on JS-disabled browsers
- use ParserOutput::addHeadItem - does not use ResourceLoader (i.e. no minifying, no batching), requires the full html text of the head item instead of just the module name
To improve this it should be possible to add style-only modules to the ParserOutput using a method ParserOutput::addModuleStyles.
The list of style-only modules should be cached.
The modules should be added to the output in OutputPage::addParserOutputNoText using OutputPage::addModuleStyles (not OutputPage::addModules).
Version: 1.20.x
Severity: enhancement