diff --git a/VisualEditor.php b/VisualEditor.php index 014917efa0..401f43e2b6 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -635,7 +635,16 @@ $wgResourceModules += array( ), 'styles' => array( // ce - 'modules/ve-mw/ce/styles/ve.ce.Node.css', + 'modules/ve-mw/ce/styles/ve.ce.MWAlienExtensionNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWBlockImageNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWHieroNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWInlineImageNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWMathNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWNumberedExternalLinkNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWReferenceListNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWReferenceNode.css', + 'modules/ve-mw/ce/styles/ve.ce.MWTransclusionNode.css', + // ui 'modules/ve-mw/ui/styles/ve.ui.MWWidget.css', 'modules/ve-mw/ui/styles/ve.ui.MWInspector.css', diff --git a/modules/ve-mw/ce/styles/ve.ce.MWAlienExtensionNode.css b/modules/ve-mw/ce/styles/ve.ce.MWAlienExtensionNode.css new file mode 100644 index 0000000000..b66591ccdf --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWAlienExtensionNode.css @@ -0,0 +1,10 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWAlienExtensionNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +.ve-ce-mwAlienExtensionNode { + display: inline-block; +} diff --git a/modules/ve-mw/ce/styles/ve.ce.MWBlockImageNode.css b/modules/ve-mw/ce/styles/ve.ce.MWBlockImageNode.css new file mode 100644 index 0000000000..b1390544db --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWBlockImageNode.css @@ -0,0 +1,53 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWBlockImageNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ +/*csslint regex-selectors:false, overqualified-elements:false */ + +figure[typeof*='mw:Image'] { + margin: 0; +} + +figure[typeof*='mw:Image'] a { + border: 0; +} + +/* TODO: Merge with div.tright styles */ +/* Due to a weird cssjanus bug, noflip rules + are set as single-rules rather than for the + whole class */ +figure[typeof*='mw:Image'].mw-halign-right { + /* @noflip */ + clear: right; + /* @noflip */ + float: right; +} + +figure[typeof*='mw:Image'].mw-halign-center { + margin-left: auto; + margin-right: auto; +} + +/* TODO: Merge with div.tleft styles */ +/* Due to a weird cssjanus bug, noflip rules + are set as single-rules rather than for the + whole class */ +figure[typeof*='mw:Image'].mw-halign-left { + /* @noflip */ + clear: left; + /* @noflip */ + float: left; +} + +/* TODO: Merge with div.thumbinner styles */ +figure[typeof='mw:Image/Thumb'], figure[typeof='mw:Image/Frame'] { + overflow: hidden; + text-align: center; +} + +/* Hide outer shield for centered images */ +figure[typeof*='mw:Image'].mw-halign-center + .ve-ce-protectedNode-shield { + display: none; +} diff --git a/modules/ve-mw/ce/styles/ve.ce.MWHieroNode.css b/modules/ve-mw/ce/styles/ve.ce.MWHieroNode.css new file mode 100644 index 0000000000..b528c90651 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWHieroNode.css @@ -0,0 +1,12 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWHieroNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +/* ve.ce.MWHieroNode */ + +.ve-ce-mwHieroNode { + display: table; +} diff --git a/modules/ve-mw/ce/styles/ve.ce.MWInlineImageNode.css b/modules/ve-mw/ce/styles/ve.ce.MWInlineImageNode.css new file mode 100644 index 0000000000..2bdf70f8ed --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWInlineImageNode.css @@ -0,0 +1,11 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWInlineImageNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +.ve-ce-mwInlineImageNode { + display: inline-block; +} + diff --git a/modules/ve-mw/ce/styles/ve.ce.MWMathNode.css b/modules/ve-mw/ce/styles/ve.ce.MWMathNode.css new file mode 100644 index 0000000000..437a63df52 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWMathNode.css @@ -0,0 +1,10 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWMathNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + + .ve-ce-mwMathNode { + display: inline-block; +} \ No newline at end of file diff --git a/modules/ve-mw/ce/styles/ve.ce.MWNumberedExternalLinkNode.css b/modules/ve-mw/ce/styles/ve.ce.MWNumberedExternalLinkNode.css new file mode 100644 index 0000000000..7310ba86e7 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWNumberedExternalLinkNode.css @@ -0,0 +1,16 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWNumberedExternalLinkNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ +/*csslint regex-selectors:false */ + +.ve-ce-surface { + counter-reset: ve-ce-mwNumberedExternalLinkNode; +} + +a[rel~="mw:ExtLink"]:empty:after { + content: "[" counter(ve-ce-mwNumberedExternalLinkNode) "]"; + counter-increment: ve-ce-mwNumberedExternalLinkNode; +} diff --git a/modules/ve-mw/ce/styles/ve.ce.MWReferenceListNode.css b/modules/ve-mw/ce/styles/ve.ce.MWReferenceListNode.css new file mode 100644 index 0000000000..78bef5d7f7 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWReferenceListNode.css @@ -0,0 +1,15 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWReferenceListNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + + .ve-ce-mwReferenceListNode .ve-ce-generated-wrapper { + display: inline-block; +} + +.ve-ce-mwReferenceListNode-muted { + font-style: italic; + color: #777; +} \ No newline at end of file diff --git a/modules/ve-mw/ce/styles/ve.ce.MWReferenceNode.css b/modules/ve-mw/ce/styles/ve.ce.MWReferenceNode.css new file mode 100644 index 0000000000..9a695e3d64 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWReferenceNode.css @@ -0,0 +1,10 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWReferenceNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ + +.ve-ce-mwReferenceNode-missingref { + cursor: not-allowed; +} \ No newline at end of file diff --git a/modules/ve-mw/ce/styles/ve.ce.MWTransclusionNode.css b/modules/ve-mw/ce/styles/ve.ce.MWTransclusionNode.css new file mode 100644 index 0000000000..ff24503ce7 --- /dev/null +++ b/modules/ve-mw/ce/styles/ve.ce.MWTransclusionNode.css @@ -0,0 +1,22 @@ +/*! + * VisualEditor ContentEditable MediaWiki MWTransclusionNode styles. + * + * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt + * @license The MIT License (MIT); see LICENSE.txt + */ +/*csslint overqualified-elements:false */ + +.ve-ce-mwTransclusionInlineNode { + display: inline-block; +} + +/* HACK: Hide Ref errors in templates */ +.ve-ce-mwTransclusionNode .mw-ext-cite-error { + display: none; +} + +/* HACK: Fake superscript style for references generated as spans in templates */ +.ve-ce-mwTransclusionNode span.reference { + vertical-align: super; + font-size: smaller; +} \ No newline at end of file diff --git a/modules/ve-mw/ce/styles/ve.ce.Node.css b/modules/ve-mw/ce/styles/ve.ce.Node.css deleted file mode 100644 index 51e9d7db99..0000000000 --- a/modules/ve-mw/ce/styles/ve.ce.Node.css +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * VisualEditor ContentEditable MediaWiki Node styles. - * - * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt - * @license The MIT License (MIT); see LICENSE.txt - */ -/*csslint regex-selectors:false, overqualified-elements:false */ - -/* ve.ce.MWTransclusionNode */ - -.ve-ce-mwTransclusionInlineNode { - display: inline-block; -} - -/* HACK: Hide Ref errors in templates */ -.ve-ce-mwTransclusionNode .mw-ext-cite-error { - display: none; -} - -/* HACK: Fake superscript style for references generated as spans in templates */ -.ve-ce-mwTransclusionNode span.reference { - vertical-align: super; - font-size: smaller; -} - -/* ve.ce.MWReferenceListNode */ - -.ve-ce-mwReferenceListNode .ve-ce-generated-wrapper { - display: inline-block; -} - -.ve-ce-mwReferenceListNode-muted { - font-style: italic; - color: #777; -} - -/* ve-ce-mwReferenceNode */ - -.ve-ce-mwReferenceNode-missingref { - cursor: not-allowed; -} - -/* ve.ce.MWInlineImageNode */ - -.ve-ce-mwInlineImageNode { - display: inline-block; -} - -/* ve.ce.MWBlockImageNode */ - -/* TODO: Merge with div.tright styles */ -/* Due to a weird cssjanus bug, noflip rules - are set as single-rules rather than for the - whole class */ -figure[typeof*='mw:Image'].mw-halign-right { - /* @noflip */ - clear: right; - /* @noflip */ - float: right; -} - -figure[typeof*='mw:Image'].mw-halign-center { - margin-left: auto; - margin-right: auto; -} - -/* TODO: Merge with div.tleft styles */ -/* Due to a weird cssjanus bug, noflip rules - are set as single-rules rather than for the - whole class */ -figure[typeof*='mw:Image'].mw-halign-left { - /* @noflip */ - clear: left; - /* @noflip */ - float: left; -} - -/* TODO: Merge with div.thumbinner styles */ -figure[typeof='mw:Image/Thumb'], figure[typeof='mw:Image/Frame'] { - overflow: hidden; - text-align: center; -} - -/* Hide outer shield for centered images */ -figure[typeof*='mw:Image'].mw-halign-center + .ve-ce-protectedNode-shield { - display: none; -} - -/* ve.ce.MWAlienExtensionNode */ - -.ve-ce-mwAlienExtensionNode { - display: inline-block; -} - -/* ve.ce.MWMathNode */ - -.ve-ce-mwMathNode { - display: inline-block; -} - -/* ve.ce.MWHieroNode */ - -.ve-ce-mwHieroNode { - display: table; -} - -/* ve.ce.MWNumberedExternalLinkNode */ - -.ve-ce-surface { - counter-reset: ve-ce-mwNumberedExternalLinkNode; -} - -a[rel~="mw:ExtLink"]:empty:after { - content: "[" counter(ve-ce-mwNumberedExternalLinkNode) "]"; - counter-increment: ve-ce-mwNumberedExternalLinkNode; -}