Page MenuHomePhabricator

Too little white space between list and section heading
Open, MediumPublic

Description

Author: csagedy

Description:
Shows that the amount of white space between a list and a section heading is less than the white space between text and a section heading.

The amount of white space between regular text and an adjacent section heading is different than the amount of white space between the end of a list and an adjacent section heading. The attachment illustrates what I mean. The upper red section has a height of 22 pixels; the lower red section has a height of 17 pixels. Ideally, every section heading should be preceded by the same amount of white space, regardless of what comes before it.


Version: 1.17.x
Severity: normal

Attached:

List_and_heading_line_spacing_discrepancy.PNG (202×118 px, 2 KB)

Details

Reference
bz32243

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:04 AM
bzimport set Reference to bz32243.
bzimport added a subscriber: Unknown Object (MLST).

csagedy wrote:

This problem could be solved by changing the parser to insert <p></p> between the end of a list and the adjacent section heading. I wrote a simple extension that does the following on the rendered HTML:

$text = preg_replace("#(</[ou]l>)(\s*<h[1-6]>)#s", "$1\n<p></p>$2", $text);

Now when I view the page, the height of the upper red area is 23 pixels and the height of the lower red area is 22 pixels. I'm not sure what's causing the difference, but at least it isn't as noticeable.

Inserting a blank <p> is really a bad way to fix it, sounds like something that needs updating of css files.

matmarex set Security to None.
matmarex removed a subscriber: Unknown Object (MLST).
matmarex subscribed.

Still affects MonoBook, but not Vector.