MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
Added collapsible sidebar CSS styling Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 26: | Line 26: | ||
.mw-collapsible:not(.mw-collapsed) > .mw-collapsible-toggle::after { | .mw-collapsible:not(.mw-collapsed) > .mw-collapsible-toggle::after { | ||
content: " ▲"; /* arrow when expanded */ | content: " ▲"; /* arrow when expanded */ | ||
} | } |
Revision as of 14:10, 20 August 2025
/* 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 */ }