diff --git a/VisualEditor.php b/VisualEditor.php index f5aa14ee93..64e1cd4085 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -1169,7 +1169,6 @@ $wgResourceModules += array( 'modules/ve-mw/ui/tools/ve.ui.MWGalleryInspectorTool.js', ), 'styles' => array( - 'modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css', 'modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css', ), 'dependencies' => array( diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js index 0e436436a6..421b2147f5 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js @@ -35,6 +35,17 @@ ve.ce.MWGalleryNode.static.tagName = 'div'; ve.ce.MWGalleryNode.static.primaryCommandName = 'gallery'; +/* Methods */ + +/** + * @inheritdoc + */ +ve.ce.MWGalleryNode.prototype.onSetup = function () { + ve.ce.MWGalleryNode.super.prototype.onSetup.apply( this, arguments ); + // The ul.gallery is 100% width, so don't give it a highlight + this.$element.find( '.gallery' ).addClass( 've-ce-noHighlight' ); +}; + /* Registration */ ve.ce.nodeFactory.register( ve.ce.MWGalleryNode ); diff --git a/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css b/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css deleted file mode 100644 index ddee66fa12..0000000000 --- a/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * VisualEditor ContentEditable MediaWiki MWGalleryNode styles. - * - * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt - * @license The MIT License (MIT); see LICENSE.txt - */ - -.ve-ce-mwGalleryNode .mw-gallery-traditional { - /* Use inline-block to avoid over-sized shields */ - display: inline-block -} \ No newline at end of file diff --git a/modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css b/modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css index 1bf1fda291..025df77174 100644 --- a/modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css +++ b/modules/ve-mw/ce/styles/nodes/ve.ce.MWTransclusionNode.css @@ -5,10 +5,6 @@ * @license The MIT License (MIT); see LICENSE.txt */ -.ve-ce-mwTransclusionInlineNode { - display: inline-block; -} - /* HACK: Hide Ref errors in templates */ .ve-ce-mwTransclusionNode .mw-ext-cite-error { display: none;