Make sure images that don't have an explicit alignment get aligned right
[lhc/web/wiklou.git] / resources / src / mediawiki.skinning / content.parsoid.less
index 081524a..a9f0ab4 100644 (file)
@@ -48,8 +48,9 @@ figure[typeof*='mw:Image'] {
        }
 
        &.mw-halign-center {
-               margin-left: auto;
-               margin-right: auto;
+               margin: 0 auto .5em auto;
+               clear: none;
+               float: none;
        }
 
        figcaption {
@@ -75,6 +76,11 @@ figure[typeof~='mw:Image/Frame'] {
        padding: 3px;
        border: 1px solid #ccc;
        background-color: #f9f9f9;
+       // Default to right alignment. This is needed since Parsoid only specifies the
+       // alignment class when the alignment is explicitly set.
+       margin: .5em 0 1.3em 1.4em;
+       clear: right;
+       float: right;
 }
 
 figure[typeof~='mw:Image/Thumb'] img,