Page MenuHomePhabricator

Math elements displayed as block have extraneous whitespace
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
Opencooper
Mar 28 2024, 6:22 PM
Referenced Files
F43689677: Screenshot 2024-03-28 at 20.45.29.png
Mar 28 2024, 7:47 PM
F43689590: image.png
Mar 28 2024, 7:46 PM
F43689368: image.png
Mar 28 2024, 7:43 PM

Description

When a <math> element uses display=block, there is now extraneous vertical whitespace. Because of T182041, these generate empty <p></p> tags surrounding the element. Before, these didn't take up any space, but now, I see the following CSS being applied:

.mw-body p {
  padding-bottom: 0.5em;
  margin: 0.5em 0px 0px;
}

What's more, these empty paragraphs are not generated if the math tags in the wikitext markup aren't surrounded by blank lines, resulting in inconsistent spacing.

An article you can see this on is Booth's_multiplication_algorithm.

Related issues have been closed as duplicates of T360917, so this probably will be too, but opening it as a new issue to keep that one clean.

Event Timeline

It seems only a problem for math images. With the new rendering, I don't see the problem

image.png (439×1 px, 122 KB)

Correct?

At least there are no <p> elements in the dom

Screenshot 2024-03-28 at 20.45.29.png (100×853 px, 33 KB)