Page MenuHomePhabricator

Template:Stack breaks display on mobile
Closed, ResolvedPublic

Event Timeline

Confirm - I'm able to reproduce this issue with Chrome Device Toolbar

Jdlrobson added subscribers: Moushira, Jdlrobson.

This is another template issue. It's wrapped inside .mw-stack provided by Template:stack which is unusual. We can add yet another hack in hacks.less but ideally we need to find a better strategy for dealing with these sort of problems - I don't know how we can get editors thinking and testing more in mobile? @Moushira any ideas?

.mw-stack {
    float: none;

Jdlrobson renamed this task from Text gets squeezed next to infobox to Template:Stack breaks display on mobile.Feb 6 2017, 6:47 PM
Jdlrobson moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
ovasileva triaged this task as Medium priority.Feb 6 2017, 8:03 PM

The template solves a problem where floats can cause large vertical whitespace gaps in content, due to clearing rules. An alternative strategy will have to be figured out.
I'll have to sleep on it, but this is difficult, since it is so directly related to how your floats are cleared.

What is the desired behavior here ? That it is full width ? Are there any semantic fullwidth classes in mobile ? Because I only see .content table, which basically limits full with elements to being tables.

@TheDJ yup - we tend to make the infobox full width and unfloated at mobile resolution. It's fine (and encouraged) for it to float at tablet and greater resolutions.
We experimented with a few css rules which might help here - > <- worth bundling mobile-float-reset into MobileFrontend while we wait on TemplateStyles?

As Jdlrobson mentioned, TemplateStyles will solve this beautifully. In the meantime, as a temporary fix, the mobile-float-reset class is now added to Template:Stack's output element. It isn't ideal, as Template:Stack now takes 100% width in Minerva skin regardless of viewport size, but at least surrounding text can no longer be squished.

Jdlrobson claimed this task.

Assuming template styles has taken care of this now and if not this can be followed up on on the wiki