From 5d0a07bf9dac66a9b705865b5c675f2be960e4e6 Mon Sep 17 00:00:00 2001 From: Rammanoj Date: Thu, 21 Sep 2017 22:48:12 +0530 Subject: [PATCH] Vector: Flip horizontal nav elements with CSS Flip horizontal nav elements with CSS prperties in RTL(right-to-left) mode Bug: T48947 Change-Id: I30a5837f84bcdeab205760644bfa40b12cefbece --- VectorTemplate.php | 16 +--------------- components/personalMenu.less | 1 - components/tabs.less | 7 ------- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/VectorTemplate.php b/VectorTemplate.php index d109031..7ed0675 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -49,17 +49,6 @@ class VectorTemplate extends BaseTemplate { unset( $this->data['action_urls'][$mode] ); } } - - // Reverse horizontally rendered navigation elements - if ( $this->data['rtl'] ) { - $this->data['view_urls'] = - array_reverse( $this->data['view_urls'] ); - $this->data['namespace_urls'] = - array_reverse( $this->data['namespace_urls'] ); - $this->data['personal_urls'] = - array_reverse( $this->data['personal_urls'] ); - } - $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode(); @@ -308,7 +297,7 @@ class VectorTemplate extends BaseTemplate { } /** - * Render one or more navigations elements by name, automatically reveresed + * Render one or more navigations elements by name, automatically reversed by css * when UI is in RTL mode * * @param array $elements @@ -318,9 +307,6 @@ class VectorTemplate extends BaseTemplate { // flexible arguments if ( !is_array( $elements ) ) { $elements = [ $elements ]; - // If there's a series of elements, reverse them when in RTL mode - } elseif ( $this->data['rtl'] ) { - $elements = array_reverse( $elements ); } // Render elements foreach ( $elements as $name => $element ) { diff --git a/components/personalMenu.less b/components/personalMenu.less index 7688e1c..979831f 100644 --- a/components/personalMenu.less +++ b/components/personalMenu.less @@ -19,7 +19,6 @@ li { line-height: 1.125em; - /* @noflip */ float: left; margin-left: 0.75em; margin-top: 0.5em; diff --git a/components/tabs.less b/components/tabs.less index 803bab7..211d1fd 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -9,7 +9,6 @@ div.vectorTabs h3 { /* Namespaces and Views */ div.vectorTabs { - /* @noflip */ float: left; height: 2.5em; .background-image('images/tab-break.png'); @@ -18,7 +17,6 @@ div.vectorTabs { padding-left: 1px; ul { - /* @noflip */ float: left; height: 100%; list-style-type: none; @@ -30,7 +28,6 @@ div.vectorTabs { background-repeat: no-repeat; li { - /* @noflip */ float: left; line-height: 1.125em; /* For IE6, overridden later to display:block by modern browsers */ @@ -107,7 +104,6 @@ div.vectorTabs { /* Ignored by IE6 which doesn't support child selector */ > a { - /* @noflip */ float: left; display: block; } @@ -116,9 +112,7 @@ div.vectorTabs { /* Variants and Actions */ div.vectorMenu { - /* @noflip */ direction: ltr; - /* @noflip */ float: left; cursor: pointer; position: relative; @@ -131,7 +125,6 @@ body.rtl div.vectorMenu { } div#mw-head div.vectorMenu h3 { - /* @noflip */ float: left; .background-image('images/tab-break.png'); background-repeat: no-repeat;