// WARNING: OOjs-UI is NOT TESTED with older browsers and is likely to break
// if loaded in browsers that don't support ES5
return call_user_func( function () {
- // Core default themes
- $themes = array( 'default' => 'mediawiki' );
- $themes += ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' );
- $modules = array();
+ $themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' );
+ // We only use the theme names for file names, and they are lowercase
+ $themes = array_map( 'strtolower', $themes );
+ $themes['default'] = 'mediawiki';
+ $modules = array();
$modules['oojs-ui'] = array(
'scripts' => array(
'resources/lib/oojs-ui/oojs-ui.js',
if ( substr( $name, 0, 5 ) === 'icons' ) {
$module['selectorWithoutVariant'] = '.oo-ui-icon-{name}, .mw-ui-icon-{name}:before';
- $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name}, .oo-ui-image-{variant}.oo-ui-icon-{name}, .mw-ui-icon-{name}-{variant}:before, .mw-ui-hovericon:hover .mw-ui-icon-{name}-{variant}-hover:before, .mw-ui-hovericon.mw-ui-icon-{name}-{variant}-hover:hover:before';
+ $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name},
+ .oo-ui-image-{variant}.oo-ui-icon-{name}, .mw-ui-icon-{name}-{variant}:before,
+ .mw-ui-hovericon:hover .mw-ui-icon-{name}-{variant}-hover:before,
+ .mw-ui-hovericon.mw-ui-icon-{name}-{variant}-hover:hover:before';
}
- $modules[ "oojs-ui.styles.$name" ] = $module;
+ $modules["oojs-ui.styles.$name"] = $module;
}
return $modules;