Page MenuHomePhabricator

contentSub and contentSub2 and first paragraph leave extranenous whitespace in header when empty
Closed, DuplicatePublicBUG REPORT

Description

On certain projects e.g. eu.wikipedia.org the #contentSub and #contentSub2 elements are empty

Screen Shot 2022-01-27 at 9.45.25 AM.png (2,014×594 px, 256 KB)

These are styled with the following rules:

{
font-size: 84%;
line-height: 1.2em;
margin: 0 0 1.4em 1em;
color: #54595d;
width: auto;
}

When empty they therefore have height

The first paragraph also has a margin-top which due to margin collapsing adds additional whitespace.

Expected: We should probably remove these elements when empty, or disable the lineheight and margin.

I've added an override to eu.wikipedia.org as a short term fix

Event Timeline

Jdlrobson renamed this task from contentSub and contentSub2 leave extranenous whitespace in header when empty to contentSub and contentSub2 and first paragraph leave extranenous whitespace in header when empty.Jan 27 2022, 5:51 PM
Jdlrobson updated the task description. (Show Details)
ovasileva triaged this task as Medium priority.Feb 8 2022, 3:16 PM

I believe this was fixed by T311421.

@Jdlrobson @Theklan I'm no longer seeing the empty divs in the HTML (on Basque or English). Can you help me find them?