Merge "CSS-based pokeys"

isekai
jenkins-bot 6 years ago committed by Gerrit Code Review
commit e99886991b

@ -309,8 +309,7 @@ class TimelessTemplate extends BaseTemplate {
Html::rawElement( 'h2', [], Html::rawElement( 'h2', [],
Html::element( 'span', [], Html::element( 'span', [],
$this->getMsg( $headerMessage )->text() $this->getMsg( $headerMessage )->text()
) . )
Html::element( 'div', [ 'class' => 'pokey' ] )
) . ) .
Html::rawElement( 'div', [ 'class' => 'sidebar-inner' ], $content ) Html::rawElement( 'div', [ 'class' => 'sidebar-inner' ], $content )
); );
@ -548,8 +547,7 @@ class TimelessTemplate extends BaseTemplate {
$html .= Html::rawElement( 'div', [ 'id' => 'personal' ], $html .= Html::rawElement( 'div', [ 'id' => 'personal' ],
Html::rawElement( 'h2', [], Html::rawElement( 'h2', [],
Html::element( 'span', [], $dropdownHeader ) . Html::element( 'span', [], $dropdownHeader )
Html::element( 'div', [ 'class' => 'pokey' ] )
) . ) .
Html::rawElement( 'div', [ 'id' => 'personal-inner', 'class' => 'dropdown' ], Html::rawElement( 'div', [ 'id' => 'personal-inner', 'class' => 'dropdown' ],
$this->getPortlet( 'personal', $personalTools, $headerMsg ) $this->getPortlet( 'personal', $personalTools, $headerMsg )
@ -870,8 +868,7 @@ class TimelessTemplate extends BaseTemplate {
if ( $this->data['language_urls'] || $this->pileOfTools['variants'] ) { if ( $this->data['language_urls'] || $this->pileOfTools['variants'] ) {
$html .= Html::rawElement( 'div', [ 'id' => 'ca-languages' ], $html .= Html::rawElement( 'div', [ 'id' => 'ca-languages' ],
Html::rawElement( 'h2', [], Html::rawElement( 'h2', [],
Html::element( 'span', [], $this->getMsg( 'timeless-languages' )->text() ) . Html::element( 'span', [], $this->getMsg( 'timeless-languages' )->text() )
Html::element( 'div', [ 'class' => 'pokey' ] )
) . ) .
Html::rawElement( 'div', [ 'id' => 'languages-inner', 'class' => 'dropdown' ], Html::rawElement( 'div', [ 'id' => 'languages-inner', 'class' => 'dropdown' ],
$variants . $variants .

@ -126,6 +126,59 @@
z-index: 3; z-index: 3;
} }
.dropdown-pokey() {
&:before,
&:after {
transform: rotate( 360deg ); // to force some smoothing in annoying browsers
border-bottom: 10px solid @base80;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
content: '';
height: 0;
width: 0;
position: absolute;
right: 1em;
z-index: 4;
}
&:before {
top: -10px;
}
&:after {
border-bottom-color: @base100;
top: -8px;
}
}
// stupid pokey alignment for menus on the left... (desktop-small dropdowns)
.dropdown-pokey-left() {
&:hover h2 span {
&:before,
&:after {
display: block;
}
}
h2 span {
.dropdown-pokey();
&:before,
&:after {
right: 0;
display: none;
}
&:before {
top: 34px;
}
&:after {
top: 36px;
}
}
}
// Categories on bottom of page // Categories on bottom of page
.categories-bottom() { .categories-bottom() {

@ -152,33 +152,6 @@ body {
} }
} }
/* Dropdown stuff */
.pokey,
.pokey:after {
border-bottom: 10px solid @base80;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
content: '';
height: 0;
position: absolute;
transform: rotate( 360deg ); // to force some smoothing in annoying browsers
width: 0;
z-index: 4;
}
.pokey {
top: 1.85em;
right: 1px;
display: none;
}
.pokey:after {
border-bottom-color: #fff;
right: -10px;
top: 2px;
}
.dropdown-toggle { .dropdown-toggle {
.dropdown-header(); .dropdown-header();
} }

@ -87,6 +87,10 @@
.sidebar-inner { .sidebar-inner {
.dropdown-menu( left ); .dropdown-menu( left );
} }
.sidebar-chunk {
.dropdown-pokey-left();
}
} }
#mw-related-navigation { #mw-related-navigation {
@ -100,6 +104,7 @@
.sidebar-inner { .sidebar-inner {
.dropdown-menu(); .dropdown-menu();
.dropdown-pokey();
top: 2.95em !important; // to override mobile positioning top: 2.95em !important; // to override mobile positioning
} }
} }

@ -71,6 +71,7 @@
top: 3.15em; top: 3.15em;
display: none !important; display: none !important;
.dropdown-menu(); .dropdown-menu();
.dropdown-pokey();
} }
.pokey { .pokey {
@ -118,7 +119,7 @@
.dropdown { .dropdown {
display: none !important; display: none !important;
.dropdown-menu(); .dropdown-menu();
right: 0; .dropdown-pokey();
// Override the mobile thing // Override the mobile thing
top: 2.25em !important; top: 2.25em !important;
} }

Loading…
Cancel
Save