Page MenuHomePhabricator

mobile view: first column in infoboxes is too wide
Closed, DuplicatePublic

Description

Hello, here's a question from a user on de:WP (https://de.wikipedia.org/wiki/Wikipedia:Fragen_zur_Wikipedia#Klasse_.22infobox.22_in_der_mobilen_Ansicht):

Currently in the mobile view, the class "infobox" generates a first column that is too wide, see e.g. https://de.m.wikipedia.org/wiki/Thor:_Tag_der_Entscheidung.

Bildschirmfoto 2017-11-06 um 08.13.23.png (1×662 px, 240 KB)

This seems to be due to

.content table.infobox td {
    width: 100%;
}

It works when

table.infobox td {width: auto !important}

is added.

Could someone have a look if this can be solved please?

Thanks,
Johanna

Event Timeline

Going to https://de.m.wikipedia.org/wiki/Thor:_Tag_der_Entscheidung?debug=true and opening the browser's developer tools, it shows that .content table.infobox td { width: 100%; } is defined in https://de.m.wikipedia.org/w/load.php?debug=true&lang=de&modules=skins.minerva.content.styles&only=styles&skin=minerva so this might be an issue in the MinervaNeue skin.

resources/skins.minerva.tablet.styles/hacks.less already has similar code to what's proposed here:

@media all and ( min-width: @deviceWidthTablet ) {
	// Float infoboxes to the right of the page
	table.infobox {
		margin: 0.5em 0 1em 35px !important;
		// Note this is fixed to ensure that we leave enough space for the sections to the infoboxes left
		max-width: @infoboxWidth;
		// FIXME [Templates]: Inline styles force us to use !important
		width: auto !important;
		float: right !important;
		clear: right !important;

		td {
			width: auto;
		}