Explicitly define module position
Style modules currently added through addModuleStyles default to being in the head ("top" position). This is an unhealthy default, since only critical styles that are needed at pageload should be in the head. In order to be able to switch the default to "bottom", existing module positions have to be defined explicitly. Bug: T97410 Change-Id: I39e3388de260bb91506fb9e6f1092f6284d13d0e
This commit is contained in:
parent
4d04704300
commit
78ed6a32af
2
Math.php
2
Math.php
|
@ -244,12 +244,14 @@ $wgSpecialPages['MathShowImage'] = 'SpecialMathShowImage';
|
|||
$wgSpecialPages['MathStatus'] = 'SpecialMathStatus';
|
||||
|
||||
$wgResourceModules['ext.math.styles'] = array(
|
||||
'position' => 'top',
|
||||
'localBasePath' => __DIR__ . '/modules',
|
||||
'remoteExtPath' => 'Math/modules',
|
||||
'styles' => 'ext.math.css',
|
||||
'targets' => array( 'desktop', 'mobile' ),
|
||||
);
|
||||
$wgResourceModules['ext.math.desktop.styles'] = array(
|
||||
'position' => 'top',
|
||||
'localBasePath' => __DIR__ . '/modules',
|
||||
'remoteExtPath' => 'Math/modules',
|
||||
'styles' => 'ext.math.desktop.css',
|
||||
|
|
Loading…
Reference in New Issue