Styling fixes

* Move CSS out of mediawiki.css which is for wikitext
  highlighting rules.
* Account for wikieditor-ui adding wrappers even when
  disabled.

Change-Id: I0fca693a6771ee1d790800c9afd5c7091fda20c1
This commit is contained in:
Ed Sanders 2017-03-27 14:00:31 +01:00
parent 29fa173331
commit 02c22f53ff
3 changed files with 22 additions and 16 deletions

View file

@ -415,8 +415,8 @@
return false;
}
} );
// We don't know when button will be added, wait until the document is ready for update it
$( document ).ready( function () { updateToolbarButton(); } );
// We don't know when button will be added, wait until the document is ready to update it
$( function () { updateToolbarButton(); } );
} );
}
} );

View file

@ -1,5 +1,25 @@
@import 'mediawiki.mixins';
.CodeMirror {
line-height: 1.5em;
padding: 0.1em;
}
.mw-codeMirror-classicToolbar {
border: 1px solid #a2a9b1;
// If WikiEditor is installed but disabled, the classic toolbar
// will still get wrapped in wikiEditor-ui
.wikiEditor-ui-text & {
border: 0;
}
}
.CodeMirror pre,
.CodeMirror-lines {
padding: 0;
}
.mw-editbutton-codemirror-on {
.background-image-svg( 'images/old-cm-on.svg', 'images/old-cm-on.png' );
}

View file

@ -1,17 +1,3 @@
.CodeMirror {
line-height: 1.5em;
padding: 0.1em;
}
.mw-codeMirror-classicToolbar {
border: 1px solid #a2a9b1;
}
.CodeMirror pre,
.CodeMirror-lines {
padding: 0;
}
/* stylelint-disable block-opening-brace-newline-before, block-opening-brace-newline-after,
block-closing-brace-space-after, declaration-block-single-line-max-declarations,
declaration-block-semicolon-newline-after, selector-list-comma-newline-after */