Page MenuHomePhabricator

Section tags can interfere with CSS flex layout
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Compare
https://szl.wikipedia.org/w/index.php?title=Przodni%C5%8F_zajta&oldid=382294&useparsoid=1
and
https://szl.wikipedia.org/w/index.php?title=Przodni%C5%8F_zajta&oldid=382294&useparsoid=0

What happens?:

The image in the "Wyrōżniōny ôbrŏzek" panel is vertically centered on the Legacy parser but not in Parsoid.

What should have happened instead?:

Both rendering should align the image in the panel.

Notes

My rapid investigation seems to designate the culprit as the <section> tag that is inserted in Parsoid and not in Legacy. Moving elements from that section tag to its parent fixes the issue with the layout; the section tag seems to interfere with the flex handling.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
cscott subscribed.

This is a dup of T333031 but we should probably not close it until we've fixed the CSS.

This case can be corrected by adding

section[aria-labelledby="mp-tfp-h2"] {
    height: 100%;
}

in https://szl.wikipedia.org/wiki/Wikipedyjo:Przodni%C5%8F_zajta_(redesign_2019)/styles.css .

T217722 would support this additional way:

section:has(#mp-tfp-h2) {
    height: 100%;
}
ssastry claimed this task.
ssastry subscribed.

I updated the CSS and will close this.