Fixing alignment of thumbcaption for mixed RTL/LTR environment.
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 1 Apr 2012 18:05:38 +0000 (21:05 +0300)
committerAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 1 Apr 2012 18:09:44 +0000 (21:09 +0300)
When an LTR wiki is used with RTL interface and vice versa, the image
thumb caption is aligned according to the interface language. It should
rather be aligned according to the content language. I explicitly set
the alignment of the caption text and the magnifying image according
to mw-content-ltr/rtl classes.

Change-Id: Ib2455a84a918631b2016f4d23c01b92b5ca8b7e8

skins/common/commonContent.css
skins/common/shared.css

index 6179918..0fe8489 100644 (file)
@@ -86,13 +86,11 @@ html .thumbimage {
 }
 html .thumbcaption {
        border: none;
-       text-align: left;
        line-height: 1.4em;
        padding: 3px !important;
        font-size: 94%;
 }
 div.magnify {
-       float: right;
        border: none !important;
        background: none !important;
 }
index 3172779..1aaf2ba 100644 (file)
@@ -262,12 +262,22 @@ input#wpSummary {
 /**
  * Image captions
  */
-.thumbcaption {
+/* @noflip */
+.mw-content-ltr .thumbcaption {
        text-align: left;
 }
-.magnify {
+/* @noflip */
+.mw-content-rtl .thumbcaption {
+       text-align: right;
+}
+/* @noflip */
+.mw-content-ltr .magnify {
        float: right;
 }
+/* @noflip */
+.mw-content-rtl .magnify {
+       float: left;
+}
 
 /**
  * Categories