Page MenuHomePhabricator

Most images are not centered at mobile screen widths in Parsoid HTML
Open, MediumPublic


When viewing Parsoid HTML at mobile device widths with Minerva styling, most images are not centered:

The exception is certain images in mw-galleries, which do appear centered:

The expectation is that all images would be centered when viewed at mobile screen widths, as happens on the production mobile sites.

(Images from

Related: T171727

Event Timeline

Mholloway renamed this task from Most images are not centered at sub-tablet widths in Parsoid HTML to Most images are not centered at mobile screen widths in Parsoid HTML.Mar 23 2018, 8:18 PM
Mholloway updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.

This doesn't really surprise me. We have made near zero effort to make Minerva styles work with Parsoid.

@Mholloway to help prioritise what is motivating you here to get this fixed?

As a side project to T188919 I've been trying to eliminate as much of the app-specific CSS odds and ends from the MobileApp extension as possible, by directing the apps toward upstream modules providing the needed styling, or simply discarding them if they're obsolete. One piece that remains is, which is used by the Android app for centering images in Parsoid HTML that aren't centered and widened via the apps' image widening transform.

In most cases I was able to find upstream styles to replace the hacky MobileApp CSS, but this wasn't one of them.

I've been trying to match Parsoid styles with MediaWiki core styles - I think this is important to future proof against any changes to the parser. If you want to submit such patches to Minerva, go for it. I only get concerned when the styles are radically different...

We have figure styling for instance in MinervaNeue/resources/skins.minerva.content.styles/thumbnails.less

ovasileva triaged this task as Medium priority.Mar 29 2018, 3:05 PM

If this task is still relevant the URI in the description should be updated so we have a frame of reference.