Page MenuHomePhabricator

Images shrunk with plain Parsoid output
Closed, ResolvedPublic

Description

Problem / Actual

Images from unmodified Parsoid output are tiny if used with PCS base CSS.

Screen Shot 2019-07-26 at 8.25.11 PM.png (893×905 px, 227 KB)

[Exhibit A: mobile-html output with typeof="mw:Image/Thumb" added to the <figure> tag.]

Expected

Screen Shot 2019-07-26 at 8.27.24 PM.png (866×905 px, 418 KB)

[Exhibit B: mobile-html output without typeof="mw:Image/Thumb" added to the <figure> tag.]
Images appear normal sized and <figcaptions> are visible.

Background

As part of the parent task code was written to inject Parsoid HTML. Since it didn't look quite as expected some of the DOM transformations that usually run on the server are performed but not all.
One transformation that is done server-side but not in the current client code was the removal of the typeof attribute from <figure> elements.

Stawman solution 1

Run the code to remove the typeof attribute from <figure> elements client side, too.

Strawman solution 2

Remove the CSS rules pertaining figure[typeof] from our CSS since this path has not been used by mobile-sections nor mobile-html.