From 05160692e7c4588fe40fe83daa32d9824f4a465c Mon Sep 17 00:00:00 2001 From: Isarra Date: Tue, 15 Dec 2020 16:19:48 +0000 Subject: [PATCH] Clean up forms some more * Add special case for multiselects for input padding * More consistent styles for default forms Bug: T259136 Change-Id: I1bea915a2887fdaf7e0bb3cc2ad17c26762688cf --- resources/forms.less | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/resources/forms.less b/resources/forms.less index e23d4a7..51d410a 100644 --- a/resources/forms.less +++ b/resources/forms.less @@ -5,10 +5,18 @@ input { } // Because weird special cases that get broken by this usually aren't forms? -// And special case out the datetime widget... -form input:not( .mw-widgets-datetime-dateTimeInputWidget-editField ) { - margin: 0.5em 0; - padding: 0.35em; +form { + // Special-case out the datetime widget + input:not( .mw-widgets-datetime-dateTimeInputWidget-editField ) { + margin: 0.5em 0; + padding: 0.35em; + } + + // Special-case out also rather more normal multiselect + .oo-ui-tagMultiselectWidget-handle input { + margin: unset; + padding: unset; + } } .oo-ui-buttonElement-framed.oo-ui-labelElement > .oo-ui-buttonElement-button, @@ -17,11 +25,16 @@ form input:not( .mw-widgets-datetime-dateTimeInputWidget-editField ) { button, textarea, select { - padding: 0.35em 1em; + padding: 0.35em; box-sizing: border-box; height: unset; } +.oo-ui-buttonElement-framed.oo-ui-labelElement > .oo-ui-buttonElement-button, +button { + padding: 0.35em 1em; +} + .mw-input-with-label { display: block; // wat (this is probably an awful idea but aaaaaah whatever) } @@ -51,7 +64,6 @@ textarea { resize: vertical; box-sizing: border-box; line-height: 1.3em; - border: solid 1px @base70; } div.editOptions { @@ -67,6 +79,17 @@ div.editOptions { } form:not( .oo-ui-layout ) { + textarea, + input { + border: solid 1px @base70; + border-radius: 2px; + } + + input[ type='file' ] { + border: unset; + border-radius: unset; + } + button, input[ type='submit' ] { border-radius: 2px; @@ -84,7 +107,8 @@ form:not( .oo-ui-layout ) { fieldset { border: 0; - margin: 1.5em 0; + margin: 1.5em 0 0; + padding: 0; legend { font-weight: bold;