MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
}); | }); | ||
}); | }); | ||
/* 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 */ | |||
} |
Revision as of 22:14, 18 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 */ }