HYGIENE: Remove element `nav` selector from mainmenu.less

The top level `nav` CSS selector (combined with the nested element
selectors, i.e. `nav ul li a`) represent a general DOM structure
which is not limited to the navigation menu and can interfere with
other styles.

This replaces the `nav` selectors (which have only been used to select
the main navigation) with a `#mw-mf-page-left` selector instead, since
that represents the main navigation as well.

Change-Id: I047108974fd295f196d9f7150c3721c05ac40c6d
This commit is contained in:
Jan Drewniak 2019-02-27 14:23:15 +01:00 committed by jdlrobson
parent 2b7fca8d7e
commit 99aa7a28a4
2 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@
box-shadow: -5px 0 0 0 rgba( 0, 0, 0, 0.3 );
}
nav {
#mw-mf-page-left {
background-color: @primaryNavBackgroundColor;
float: left;
min-height: 100%;
@ -153,7 +153,7 @@ nav {
.primary-navigation-enabled {
background-color: @primaryNavBackgroundColor;
nav {
#mw-mf-page-left {
width: @menuWidth;
}
@ -197,7 +197,7 @@ nav {
.transition-transform( @transition );
}
nav {
#mw-mf-page-left {
width: @menuWidth;
.transition( visibility 0s @duration );
@ -234,7 +234,7 @@ nav {
.transform( translate( @menuWidth, 0 ) );
}
nav {
#mw-mf-page-left {
// make menu scrollable when open (on small screens)
position: static;
.transition( none );
@ -266,7 +266,7 @@ nav {
}
}
nav {
#mw-mf-page-left {
width: @menuWidthTablet;
}

View File

@ -15,7 +15,7 @@ class ArticlePage
a(:beta_mode_indicator, css: '.branding-box sup')
# left nav
nav(:navigation, css: 'nav')
nav(:navigation, css: '#mw-mf-page-left')
a(:about_link) { |page| page.navigation_element.link_element(text: /^About/) }
a(:disclaimer_link) { |page| page.navigation_element.link_element(text: 'Disclaimers') }