MobileFrontend currently uses this hook to register three one global Less variables.
Use of this hook is deprecated because of inherent cache problems, as well as due to tendency to create slippery dependencies between extensions.
- The values of these variables should be maintained elsewhere. (It seems this is done already, the values from from constants and configuration variables).
- Should be exposed to individual modules's stylesheets by using a getLessVars method. The easiest way to do this is through a Module subclass. This could be generalised if needed.
Usage
- wgMFDeviceWidthMobileSmall – comes from $config->get( 'MFDeviceWidthMobileSmall' )
- Used in MobileFrontend
- Used in MinervaNeue.
The use in MinervaNeue presumably means there is already a dependency on MobileFrontend from that skin. If so, then it could potentially use the same Module subclass as the one MobileFrontend will use. Alternatively, it could have its own getLessVars method to register the same less variable from the same source. (Thus making Config the API, instead of global LessVars itself).