HomePhabricator

Avoid height jump (FOUC) when showing 'loading' placeholder

Authored by Esanders on Feb 14 2018, 2:06 PM.

Description

Avoid height jump (FOUC) when showing 'loading' placeholder

Put a min-height on the placeholder equal to the
height of the image.

Also put the placeholder insider the wrapper and
toggle the image instead, to avoid inline-block
height issues.

Generate $placeholder template just once.

And wait just a little bit before hiding the image, to
minimize FOUC when the image is already available.

Bug: T187327
Change-Id: Ie650bb8a429ce3dc1298ab436f28e63805a81eb7

Details

Committed
matthiasmullieFeb 15 2018, 11:42 AM
Parents
rETHR76833e9c0bfc: build: Update linters
Branches
Unknown
Tags
Unknown
References
refs/changes/57/410457/3
ChangeId
Ie650bb8a429ce3dc1298ab436f28e63805a81eb7