From: Volker E Date: Tue, 14 Nov 2017 23:00:46 +0000 (-0800) Subject: Hide empty OOUI FieldsetLayout headers X-Git-Tag: 1.31.0-rc.0~1485^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=382e366196b2b9aa7eb08c92776e6f716f8f5d65;p=lhc%2Fweb%2Fwiklou.git Hide empty OOUI FieldsetLayout headers In cases where the label or the icon are unset the header shouldn't take up space, nor should it be visible to screenreaders. That's a workaround, it should not be in the markup. T180535 is the place to address the unnecessary markup further. Bug: T177668 Bug: T180535 Change-Id: I39088107e6ab07399f9826dd925df9e1b8dda006 --- diff --git a/resources/src/mediawiki/htmlform/ooui.styles.less b/resources/src/mediawiki/htmlform/ooui.styles.less index 1607489df9..e78a4caab7 100644 --- a/resources/src/mediawiki/htmlform/ooui.styles.less +++ b/resources/src/mediawiki/htmlform/ooui.styles.less @@ -1,4 +1,4 @@ -/* OOUIHTMLForm styles */ +// OOUIHTMLForm styles .mw-htmlform-ooui-wrapper.oo-ui-panelLayout-padded { padding: 1em 1.25em 1.25em; } @@ -43,9 +43,14 @@ } } -/* Flatlist styling for PHP widgets... */ +// HACK: Hide empty fieldsetLayoutHeaders, until T180535 isn't resolved +.oo-ui-fieldsetLayout:not( .oo-ui-labelElement ):not( .oo-ui-iconElement ) > .oo-ui-fieldsetLayout-header { + display: none; +} + +// Flatlist styling for PHP widgets... .mw-htmlform-flatlist .oo-ui-fieldLayout-align-inline, -/* ...and for JS widgets */ +// ...and for JS widgets .mw-htmlform-flatlist .oo-ui-radioOptionWidget, .mw-htmlform-flatlist .oo-ui-checkboxMultioptionWidget { display: inline-block;