diff --git a/VisualEditor.php b/VisualEditor.php index 75c2d9c06d..ffa7f67fb2 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -1169,6 +1169,7 @@ $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 61d6290ed7..0e436436a6 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWGalleryNode.js @@ -18,6 +18,9 @@ ve.ce.MWGalleryNode = function VeCeMWGalleryNode( model, config ) { // Parent constructor ve.ce.MWBlockExtensionNode.call( this, model, config ); + + // DOM changes + this.$element.addClass( 've-ce-mwGalleryNode' ); }; /* Inheritance */ diff --git a/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css b/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css new file mode 100644 index 0000000000..ddee66fa12 --- /dev/null +++ b/modules/ve-mw/ce/styles/nodes/ve.ce.MWGalleryNode.css @@ -0,0 +1,11 @@ +/*! + * 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