diff --git a/resources/skins.minerva.content.styles/links.less b/resources/skins.minerva.content.styles/links.less index 7a6c90fe2..728e41e7d 100644 --- a/resources/skins.minerva.content.styles/links.less +++ b/resources/skins.minerva.content.styles/links.less @@ -62,15 +62,3 @@ a { background: none !important; padding: 0 !important; } - -// Numbered external links, copied from content.parsoid.less -// TODO: Separate theme-agnostic rules from that module -// so we can load it here. -.mw-parser-output { - counter-reset: mw-numbered-ext-link; - - a[ rel~='mw:ExtLink' ]:empty:after { - content: '[' counter( mw-numbered-ext-link ) ']'; - counter-increment: mw-numbered-ext-link; - } -} diff --git a/resources/skins.minerva.content.styles/text.less b/resources/skins.minerva.content.styles/text.less index 13cc94f83..435b64a3e 100644 --- a/resources/skins.minerva.content.styles/text.less +++ b/resources/skins.minerva.content.styles/text.less @@ -62,7 +62,6 @@ i { font-style: italic; } -.mw-ref, // For Parsoid content (e.g. mediawiki.skinning.content.parsoid) sup { vertical-align: super; } @@ -71,7 +70,6 @@ sub { vertical-align: sub; } -.mw-ref, // For Parsoid content (e.g. mediawiki.skinning.content.parsoid) sub, sup { font-size: 0.75em; diff --git a/resources/skins.minerva.content.styles/thumbnails.less b/resources/skins.minerva.content.styles/thumbnails.less index 7a76a3751..77ffffc59 100644 --- a/resources/skins.minerva.content.styles/thumbnails.less +++ b/resources/skins.minerva.content.styles/thumbnails.less @@ -43,11 +43,7 @@ } // Hide the image magnification icon normally displayed in image captions - .magnify, - // Parsoid version of magnification icon (T160960) - figure[ typeof*='mw:Image/Thumb' ] > a:after, - figure[ typeof*='mw:Video/Thumb' ] > a:after, - figure[ typeof*='mw:Audio/Thumb' ] > a:after { + .magnify { display: none; } } diff --git a/skin.json b/skin.json index 4303f8d0e..5c4c41e58 100644 --- a/skin.json +++ b/skin.json @@ -105,7 +105,9 @@ "mediawiki.special.search.styles": [ "skinStyles/mediawiki.special.search.styles/minerva.less" ], - "mediawiki.skinning.content.parsoid": [], + "mediawiki.skinning.content.parsoid": [ + "skinStyles/mediawiki.skinning.content.parsoid/minerva.less" + ], "mediawiki.hlist": [ "skinStyles/mediawiki.hlist/minerva.less" ], diff --git a/skinStyles/mediawiki.skinning.content.parsoid/minerva.less b/skinStyles/mediawiki.skinning.content.parsoid/minerva.less new file mode 100644 index 000000000..0c6a854d9 --- /dev/null +++ b/skinStyles/mediawiki.skinning.content.parsoid/minerva.less @@ -0,0 +1,52 @@ +/** + * Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser. + */ + +/* + * Auto-numbered external links + * (copied from MediaWiki's content.parsoid.less) + */ +.mw-parser-output { + counter-reset: mw-numbered-ext-link; + + a[ rel~='mw:ExtLink' ]:empty:after { + content: '[' counter( mw-numbered-ext-link ) ']'; + counter-increment: mw-numbered-ext-link; + } +} + +/** + * Block media items + * (mostly derived from MediaWiki's content.parsoid.less) + */ +figure[ typeof*='mw:Image' ], +figure[ typeof*='mw:Video' ], +figure[ typeof*='mw:Audio' ] { + max-width: 100%; + // Defaults to right alignment when not explicitly set. Should be flippable. + margin: 0.6em 0 0.6em 1.4em; + + &.mw-halign-left { + /* @noflip */ + margin: 0.6em 1.4em 0.6em 0; + /* @noflip */ + clear: left; + /* @noflip */ + float: left; + } + + &.mw-halign-right { + /* @noflip */ + margin: 0.6em 0 0.6em 1.4em; + /* @noflip */ + clear: right; + /* @noflip */ + float: right; + } + + &.mw-halign-center { + margin: 0.6em auto 0.6em auto; + clear: none; + float: none; + } +} diff --git a/skinStyles/mobile.editor.ve/minerva.less b/skinStyles/mobile.editor.ve/minerva.less index db7eb2048..58bad798b 100644 --- a/skinStyles/mobile.editor.ve/minerva.less +++ b/skinStyles/mobile.editor.ve/minerva.less @@ -8,43 +8,6 @@ h1, h2, h3, h4, h5 { display: block; } - - // Styling for images (as output by Parsiod) - // These styles are mostly derived from content.parsoid.less, which the Minerva skin - // opts out of (since the styles are largely Vectorish). - // FIXME: Once Parser and Parsoid output are synchronized, we'll want to move these - // from here into the regular Minerva content styles. - figure[ typeof*='mw:Image' ], - figure[ typeof*='mw:Video' ], - figure[ typeof*='mw:Audio' ] { - max-width: 100%; - // Defaults to right alignment when not explicitly set. Should be flippable. - margin: 0.6em 0 0.6em 1.4em; - - &.mw-halign-left { - /* @noflip */ - margin: 0.6em 1.4em 0.6em 0; - /* @noflip */ - clear: left; - /* @noflip */ - float: left; - } - - &.mw-halign-right { - /* @noflip */ - margin: 0.6em 0 0.6em 1.4em; - /* @noflip */ - clear: right; - /* @noflip */ - float: right; - } - - &.mw-halign-center { - margin: 0.6em auto 0.6em auto; - clear: none; - float: none; - } - } } .overlay-content {