MediaWiki:Common.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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* CSS placed here will be applied to all skins */ mw.loader.using('jquery.makeCollapsible').then(function () { // Turn sidebar collapsibles into an accordion $('#mw-panel .mw-collapsible').on('beforeExpand.mw-collapsible', function () { // Collapse siblings when one expands $(this).siblings('.mw-collapsible').each(function () { if (!$(this).hasClass('mw-collapsed')) { $(this).find('.mw-collapsible-toggle').click(); } }); }); }); /* Style collapsible sidebar sections like dropdowns */ .mw-collapsible-toggle { float: right; font-weight: bold; cursor: pointer; } .mw-collapsible.mw-collapsed > .mw-collapsible-toggle::after { content: " ▼"; /* arrow when collapsed */ } .mw-collapsible:not(.mw-collapsed) > .mw-collapsible-toggle::after { content: " ▲"; /* arrow when expanded */ } /* Collapsible Sidebar Styles */ .sidebar-toggle { cursor: pointer; font-weight: bold; color: #0645ad; margin-left: 8px; font-size: 11px; user-select: none; text-decoration: none; display: inline-block; min-width: 20px; text-align: center; } .sidebar-toggle:hover { text-decoration: underline; color: #0b0080; background-color: #f8f9fa; border-radius: 2px; } /* Collapsed state styling */ #mw-panel .portal.sidebar-collapsed .body { display: none !important; } /* Improve sidebar section spacing */ #mw-panel .portal { margin-bottom: 0.7em; border-bottom: 1px solid #eaecf0; padding-bottom: 0.3em; } #mw-panel .portal:last-child { border-bottom: none; } /* Header styling for collapsible sections */ #mw-panel .portal h3 { cursor: default; position: relative; font-weight: bold; color: #333; } /* Body content styling */ #mw-panel .portal .body { transition: all 0.3s ease; } #mw-panel .portal .body ul { margin: 0.3em 0 0 0; padding: 0; list-style: none; } #mw-panel .portal .body li { margin: 0.2em 0; padding: 0.1em 0; line-height: 1.3; } #mw-panel .portal .body li a { color: #0645ad; text-decoration: none; display: block; padding: 2px 0; } #mw-panel .portal .body li a:hover { text-decoration: underline; background-color: #f8f9fa; border-radius: 2px; padding: 2px 4px; margin: 0 -4px; } /* Visual indicator for collapsible sections */ #mw-panel .portal h3:has(.sidebar-toggle) { background: linear-gradient(to right, #f8f9fa 0%, transparent 100%); padding: 2px 4px; margin: 0 -4px; border-radius: 3px; } /* Responsive adjustments */ @media (max-width: 768px) { .sidebar-toggle { font-size: 14px; margin-left: 10px; } }