Result:
First sidebar section title is gobbled up and invisible
Expected Result:
When adding a menu/tree view to my wiki it was noticed that the title for that section is invisible if its the first section.
First sidebar section title should be visible right, if you want a particular title to be invisible this should be an option to that section.
Bug or possible enhancement if this is by design, I couldnt find any mention of if this was by intent.
The CSS for Vector style says something about IE8? skins/Vector/components/navigation.less
Reproduction
- Goto https://www.mediawiki.org/wiki/MediaWiki Using: Chrome and Firefox on Linux or Windows 10, generic install even seen on mediawiki.org
- Look at sidebar, notice the first section "Main Page..." is missing the portal-section-title
- On Chrome; right click on "Main Page" and select Inspect
- Look up a little in the HTML to see "<h3 id="p-navigation-label">Navigation</h3>", click on this
- See that the "Navigation" title has had its display value over-ridden due to "adjacent sibling" property div#mw-panel #p-logo + div.portal h3 { display: none; } h3 { display: block; <--- struck thru ....
Hacky Fix:
Add a separating <div></div> before any section using the hook for sidebar
// Place at end of your LocalSettings.php $wgHooks['SkinBuildSidebar'][] = 'fnNewSidebarItem'; function fnNewSidebarItem( $skin, &$bar ) { $bar = array( '' => "" ) + $bar; }
Alternative Fix:
Edit your skins/Vector/components/navigation.less and remove the "h3" section in the p-logo + div.portal section
/* First sidebar portlet. Not using :first-of-type for IE<=8 support. */ #p-logo + div.portal { ... h3 { ... } ... }