3 * https://www.mediawiki.org/wiki/OOjs_UI
5 * Copyright 2011–2015 OOjs Team and other contributors.
6 * Released under the MIT license
7 * http://oojs.mit-license.org
9 * Date: 2015-02-19T01:33:11Z
13 * @extends OO.ui.Theme
17 OO.ui.MediaWikiTheme = function OoUiMediaWikiTheme() {
19 OO.ui.MediaWikiTheme.super.call( this );
24 OO.inheritClass( OO.ui.MediaWikiTheme, OO.ui.Theme );
31 OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) {
41 classes = OO.ui.MediaWikiTheme.super.prototype.getElementClasses.call( this, element );
43 if ( element.supports( [ 'isFramed', 'isDisabled', 'hasFlag' ] ) ) {
44 if ( element.isFramed() && ( element.isDisabled() || element.hasFlag( 'primary' ) ) ) {
45 variants.invert = true;
47 variants.progressive = element.hasFlag( 'progressive' );
48 variants.constructive = element.hasFlag( 'constructive' );
49 variants.destructive = element.hasFlag( 'destructive' );
53 for ( variant in variants ) {
54 classes[ variants[ variant ] ? 'on' : 'off' ].push( 'oo-ui-image-' + variant );
62 OO.ui.theme = new OO.ui.MediaWikiTheme();