[ 'name' => 'ResourceLoaderDynamicStyles', 'content' => '' ]
);
+ $separateReq = [ 'site.styles', 'user.styles' ];
foreach ( $this->rlExemptStyleModules as $group => $moduleNames ) {
- $chunks[] = $this->makeResourceLoaderLink( $moduleNames,
+ // Combinable modules
+ $chunks[] = $this->makeResourceLoaderLink(
+ array_diff( $moduleNames, $separateReq ),
ResourceLoaderModule::TYPE_STYLES
);
+
+ foreach ( array_intersect( $moduleNames, $separateReq ) as $name ) {
+ // These require their own dedicated request in order to support "@import"
+ // syntax, which is incompatible with concatenation. (T147667, T37562)
+ $chunks[] = $this->makeResourceLoaderLink( $name,
+ ResourceLoaderModule::TYPE_STYLES
+ );
+ }
}
return self::combineWrappedStrings( array_merge( $chunks, $append ) );
'user' => [ 'user.styles', 'example.user' ],
],
'<meta name="ResourceLoaderDynamicStyles" content=""/>' . "\n" .
- '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.site.a%2Cb%7Csite.styles&only=styles&skin=fallback"/>' . "\n" .
- '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.user%7Cuser.styles&only=styles&skin=fallback&version=17f1vjw"/>',
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.site.a%2Cb&only=styles&skin=fallback"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=site.styles&only=styles&skin=fallback"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=example.user&only=styles&skin=fallback&version=0a56zyi"/>' . "\n" .
+ '<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=user.styles&only=styles&skin=fallback&version=1e9z0ox"/>',
],
// @codingStandardsIgnoreEnd Generic.Files.LineLength
];