Look at the collapsed/expanded cookie and add class="mw-collapsed"
if it's going to be collapsed.
This is kind of a prelude to T42812.
Change-Id: Icaca762a9d7b000c973d9275f395623129f67979
$context->msg( 'recentchanges-legend-heading' )->parse();
# Collapsible
+ $collapsedState = $this->getRequest()->getCookie( 'changeslist-state' );
+ $collapsedClass = $collapsedState === 'collapsed' ? ' mw-collapsed' : '';
$legend =
- '<div class="mw-changeslist-legend">' .
+ '<div class="mw-changeslist-legend mw-collapsible' . $collapsedClass . '">' .
$legendHeading .
'<div class="mw-collapsible-content">' . $legend . '</div>' .
'</div>';
unicode-bidi: -moz-isolate;
unicode-bidi: isolate;
}
+
+/* Prevent FOUC if legend is initially collapsed */
+.mw-changeslist-legend.mw-collapsed .mw-collapsible-content {
+ display: none;
+}