Last modified: 2014-01-03 15:56:13 UTC
https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/shared.css?view=markup uses a lot of CSS definitions based on the CSS classes mw-content-ltr or mw-content-rtl. On the preview of [[Special:ExpandTemplates]] the CSS classes mw-content-ltr/mw-content-rtl doesn't exist. So the definitions doesn't work. Expected result: The preview should be in a <div class="mw-content-DIR" lang="LANG" dir="DIR"> container based on the direction DIR and the language LANG of the page content language of the context title. Test case: <div class="magnify">float right</div> should aligned right on a ltr wiki and should left aligned on a rtl wiki.
(In reply to comment #0) > https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/shared.css?view=markup Just for the records, that's https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=skins/common/shared.css;hb=HEAD nowadays.
I'm not sure that I understand the example. "float right" here is just text. Did you mean to write it as CSS? The ExpandTemplates page works correctly for me in an RTL wiki. The mw-content-rtl class is applied to the whole page. What is the actual problem?
skins/common/shared.css contains: /* @noflip */ .mw-content-ltr .magnify { float: right; } /* @noflip */ .mw-content-rtl .magnify { float: left; } class="magnify" should either be float:left or float:right. The text "float right" was just a dummy. Better test case: <div class="magnify">magnify</div>Text should look like <div style="float: right;">magnify</div>Text on LTR page content language and should look like <div style="float: left;">magnify</div>Text on RTL page content language. Actual result: <div>magnify</div>Text without float.
Oh, I get it now. Thanks for the clarification.
Created attachment 11205 [details] Patch for ExpandTemplates_body.php Patch for ExpandTemplates_body.php added
ping - patch available here, somebody need to bring it into Gerrit.
Equivalent patch seems to have landed in commit dc0ffb28482e01bcef46a139fe262827c84de9aa, 2013-02-03. Resolving fixed.