From: Ed Sanders Date: Fri, 28 Apr 2017 12:30:51 +0000 (+0100) Subject: Simplify Image/Video/Audio rules using LESS nesting X-Git-Tag: 1.31.0-rc.0~3399^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/supprimer.php?a=commitdiff_plain;h=4180ba1229eae419233e5775eef0db226baf754d;p=lhc%2Fweb%2Fwiklou.git Simplify Image/Video/Audio rules using LESS nesting Also allow Video/Audio to contain img instead of video for VE support. Change-Id: Ic54662bbcd50de70133c6581cd7d8025c872a7f4 --- diff --git a/resources/src/mediawiki.skinning/content.parsoid.less b/resources/src/mediawiki.skinning/content.parsoid.less index b09986f278..7a7df7a30f 100644 --- a/resources/src/mediawiki.skinning/content.parsoid.less +++ b/resources/src/mediawiki.skinning/content.parsoid.less @@ -128,31 +128,33 @@ figure[typeof~='mw:Audio/Frame'] { margin: 0.5em 0 1.3em 1.4em; clear: right; float: right; -} -figure[typeof~='mw:Image/Thumb'] > *:first-child > img, -figure[typeof~='mw:Video/Thumb'] > *:first-child > video, -figure[typeof~='mw:Audio/Thumb'] > *:first-child > video, -figure[typeof~='mw:Image/Frame'] > *:first-child > img, -figure[typeof~='mw:Video/Frame'] > *:first-child > video, -figure[typeof~='mw:Audio/Frame'] > *:first-child > video { - border: 1px solid #c8ccd1; - margin: 3px; - background: #fff; + > *:first-child { + > img, + > video { + border: 1px solid #c8ccd1; + margin: 3px; + background: #fff; + } + } } /* Same as img.thumbborder in content.css */ -.mw-image-border > *:first-child > img, -.mw-image-border > *:first-child > video { - border: 1px solid #eaecf0; +.mw-image-border > *:first-child { + > img, + > video { + border: 1px solid #eaecf0; + } } /* Hide the caption for frameless and plain floated images */ -figure[typeof~='mw:Image/Frameless'] > figcaption, -figure[typeof~='mw:Video/Frameless'] > figcaption, -figure[typeof~='mw:Audio/Frameless'] > figcaption, -figure[typeof~='mw:Image'] > figcaption, -figure[typeof~='mw:Video'] > figcaption, -figure[typeof~='mw:Audio'] > figcaption { - display: none; +figure[typeof~='mw:Image/Frameless'], +figure[typeof~='mw:Video/Frameless'], +figure[typeof~='mw:Audio/Frameless'], +figure[typeof~='mw:Image'], +figure[typeof~='mw:Video'], +figure[typeof~='mw:Audio'] { + > figcaption { + display: none; + } }