jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up ee320648fd1: output mw-content-{ltr,rtl} 
unconditionally
......................................................................


Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally

So much CSS relies on .mw-content-{ltr,rtl} now for directionality
things that we should just have it everywhere.

Bug: T97744
Change-Id: I0c0466023bc3b88d58f7067c3226f2dbdd1488ed
---
M includes/skins/SkinTemplate.php
1 file changed, 5 insertions(+), 9 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 5364719..d7e0132 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -421,15 +421,11 @@
                $realBodyAttribs = array( 'id' => 'mw-content-text' );
 
                # Add a mw-content-ltr/rtl class to be able to style based on 
text direction
-               # when the content is different from the UI language, i.e.:
-               # not for special pages or file pages AND only when viewing
-               if ( !in_array( $title->getNamespace(), array( NS_SPECIAL, 
NS_FILE ) ) &&
-                       Action::getActionName( $this ) === 'view' ) {
-                       $pageLang = $title->getPageViewLanguage();
-                       $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
-                       $realBodyAttribs['dir'] = $pageLang->getDir();
-                       $realBodyAttribs['class'] = 'mw-content-' . 
$pageLang->getDir();
-               }
+               # when the content is different from the UI language
+               $pageLang = $title->getPageViewLanguage();
+               $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
+               $realBodyAttribs['dir'] = $pageLang->getDir();
+               $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
 
                $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, 
$out->mBodytext );
                $tpl->setRef( 'bodytext', $out->mBodytext );

-- 
To view, visit https://gerrit.wikimedia.org/r/208282
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c0466023bc3b88d58f7067c3226f2dbdd1488ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Daniel Friesen <dan...@nadir-seen-fire.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to