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:
parent
2b7fca8d7e
commit
99aa7a28a4
|
@ -19,7 +19,7 @@
|
||||||
box-shadow: -5px 0 0 0 rgba( 0, 0, 0, 0.3 );
|
box-shadow: -5px 0 0 0 rgba( 0, 0, 0, 0.3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
#mw-mf-page-left {
|
||||||
background-color: @primaryNavBackgroundColor;
|
background-color: @primaryNavBackgroundColor;
|
||||||
float: left;
|
float: left;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
@ -153,7 +153,7 @@ nav {
|
||||||
.primary-navigation-enabled {
|
.primary-navigation-enabled {
|
||||||
background-color: @primaryNavBackgroundColor;
|
background-color: @primaryNavBackgroundColor;
|
||||||
|
|
||||||
nav {
|
#mw-mf-page-left {
|
||||||
width: @menuWidth;
|
width: @menuWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ nav {
|
||||||
.transition-transform( @transition );
|
.transition-transform( @transition );
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
#mw-mf-page-left {
|
||||||
width: @menuWidth;
|
width: @menuWidth;
|
||||||
|
|
||||||
.transition( visibility 0s @duration );
|
.transition( visibility 0s @duration );
|
||||||
|
@ -234,7 +234,7 @@ nav {
|
||||||
.transform( translate( @menuWidth, 0 ) );
|
.transform( translate( @menuWidth, 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
#mw-mf-page-left {
|
||||||
// make menu scrollable when open (on small screens)
|
// make menu scrollable when open (on small screens)
|
||||||
position: static;
|
position: static;
|
||||||
.transition( none );
|
.transition( none );
|
||||||
|
@ -266,7 +266,7 @@ nav {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
#mw-mf-page-left {
|
||||||
width: @menuWidthTablet;
|
width: @menuWidthTablet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class ArticlePage
|
||||||
a(:beta_mode_indicator, css: '.branding-box sup')
|
a(:beta_mode_indicator, css: '.branding-box sup')
|
||||||
|
|
||||||
# left nav
|
# 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(:about_link) { |page| page.navigation_element.link_element(text: /^About/) }
|
||||||
a(:disclaimer_link) { |page| page.navigation_element.link_element(text: 'Disclaimers') }
|
a(:disclaimer_link) { |page| page.navigation_element.link_element(text: 'Disclaimers') }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue