mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
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
This commit is contained in:
parent
5027acf693
commit
5d0a07bf9d
|
@ -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 ) {
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
li {
|
||||
line-height: 1.125em;
|
||||
/* @noflip */
|
||||
float: left;
|
||||
margin-left: 0.75em;
|
||||
margin-top: 0.5em;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue