MediaWiki:Vector.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* ---------------------------------------------
HIDE sidebar blocks for anonymous users only
--------------------------------------------- */
/* Hides all sidebar blocks except the logo for anonymous users */
body:not(.mw-user-loggedin) #mw-panel .portal {
display: none !important;
}
/* Show personal tools (login link) */
body:not(.mw-user-loggedin) #p-personal {
display: block !important;
}
/* Ensure the logo is always visible */
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a img {
display: block !important;
visibility: visible !important;
}
/* Add dummy sidebar space for layout balance */
body:not(.mw-user-loggedin) #mw-panel::after {
content: '';
display: block;
height: 400px; /* Adjust this if needed */
}
/* ---------------------------------------------
RESET sidebar visibility for logged-in users
--------------------------------------------- */
/* Force show sidebar portals for logged-in users */
body.mw-user-loggedin #mw-panel .portal {
display: block !important;
visibility: visible !important;
}
/* Restore background if it was removed for anons */
body.mw-user-loggedin #mw-panel {
background: #f8f9fa !important;
padding-top: 1em;
}