Page MenuHomePhabricator

mw-collapsible-content should be visible by default on print
Closed, DuplicatePublicBUG REPORT

Description

When printing a page with collapsible elements the output of the print depends on the state of those collapsible elements, and even if editors want to collapse content and allow readers to show the contents it if they want to read more there's no way of doing that on a printed page. That's why I think that mw-collapsible-content should be visible on print regardless of its state at the moment of printing. If editors want to not display content for print they can always use the noprint class if they want that content to be hidden on print.

List of steps to reproduce (step by step, including full links if applicable):

  • Use the following snippet in a wikitext page:
<div class="mw-collapsible" style="clear:both">
<p>Always visible by default</p>
</div>

<div class="mw-collapsible mw-collapsed" style="clear:both">
<p>Collapsed by default, visible on print</p>
</div>

<div class="mw-collapsible mw-collapsed noprint" style="clear:both">
<p>Collapsed by default, not visible on print</p>
</div>
  • Go to the browsers print preview screen (Ctrl+P) and check the result

What happens?:
The output text is:
Always visible by default

What should have happened instead?:
The output should be:
Always visible by default
Collapsed by default, visible on print

Event Timeline

Yes, it would be nice if we didn't have to add the several lines in en.wp Print.css just to handle this (I do not think it covers all cases of elements that can be collapsed).

That said, there may be loading issues of interest. Not totally certain.