Page MenuHomePhabricator

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


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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 23 2018, 8:11 PM
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.
Mholloway updated the task description. (Show Details)
Mholloway updated the task description. (Show Details)Mar 23 2018, 8:20 PM
Mholloway updated the task description. (Show Details)Mar 23 2018, 10:18 PM
Jdlrobson moved this task from Backlog to Tracking on the MinervaNeue board.Mar 23 2018, 11:49 PM
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 Normal priority.Mar 29 2018, 3:05 PM