mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 02:38:40 +00:00
Add missing mw-content-(dir) class to MWPreviewElement
Also allow preview elements to existing with an mw-body-content area withouth the font size being applied twice. Depends-On: Ibbf989dcebf2d21fd2ac481f17062f366ff29e41 Change-Id: I284bcd5dd25cdbb883427ebacb41af1bbf50b60f
This commit is contained in:
parent
99a226020e
commit
60e129062a
|
@ -1318,6 +1318,7 @@
|
|||
"modules/ve-mw/ui/styles/inspectors/ve.ui.MWExtensionInspector.css",
|
||||
"modules/ve-mw/ui/styles/inspectors/ve.ui.MWLiveExtensionInspector.css",
|
||||
"modules/ve-mw/ui/styles/elements/ve.ui.MWExpandableErrorElement.css",
|
||||
"modules/ve-mw/ui/styles/elements/ve.ui.MWPreviewElement.css",
|
||||
"modules/ve-mw/ui/styles/tools/ve.ui.MWPopupTool.css",
|
||||
"modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css",
|
||||
"modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css"
|
||||
|
|
|
@ -29,6 +29,16 @@ OO.inheritClass( ve.ui.MWPreviewElement, ve.ui.PreviewElement );
|
|||
|
||||
/* Method */
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.ui.MWPreviewElement.prototype.setModel = function ( model ) {
|
||||
// Parent method
|
||||
ve.ui.MWPreviewElement.super.prototype.setModel.call( this, model );
|
||||
|
||||
this.$element.addClass( 'mw-content-' + this.model.getDocument().getDir() );
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
11
modules/ve-mw/ui/styles/elements/ve.ui.MWPreviewElement.css
Normal file
11
modules/ve-mw/ui/styles/elements/ve.ui.MWPreviewElement.css
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*!
|
||||
* VisualEditor MediaWiki UserInterface preview element styles.
|
||||
*
|
||||
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
|
||||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
.mw-body-content .ve-ui-mwPreviewElement {
|
||||
/* Don't apply font adjustment twice if already inside a content area */
|
||||
font-size: inherit;
|
||||
}
|
Loading…
Reference in a new issue