From f4658a4d0e63947ead75e1d08e4d833c23e1cafe Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 2 Apr 2018 22:26:06 +0100 Subject: [PATCH] Fixes for action=edit page styling * Use box-sizing:border-box when adding textarea padding - before the right side of the textarea did not align with the right side of the bell icon. Now it does. * Fix specificity of rule hiding cancel link and "editing help" which appear at the bottom of the form. * Fix height of noJS textarea (70vh) * Remove some unnecessary extra margins and padding (the minor edit and watch this page checkboxes will now show on the same line) * Update specificity for oo-ui-fieldLayout-body so that it does not apply to the summary form. Change-Id: I8d3d61fdc51934a6ef0885cde94dac1e8c5e33ca --- .../skins.minerva.base.styles/common.less | 2 ++ resources/skins.minerva.base.styles/ui.less | 2 +- .../mediawiki.action.edit.styles/minerva.less | 28 ++++++++----------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/resources/skins.minerva.base.styles/common.less b/resources/skins.minerva.base.styles/common.less index a47ce7f35..b7cda8900 100644 --- a/resources/skins.minerva.base.styles/common.less +++ b/resources/skins.minerva.base.styles/common.less @@ -46,6 +46,8 @@ textarea { padding: 5px 0 5px 5px; width: 100%; resize: none; + // stylelint-disable-next-line no-descending-specificity + .box-sizing( border-box ); } // We hide the table of contents unless the user is viewing in tablet resolution or higher diff --git a/resources/skins.minerva.base.styles/ui.less b/resources/skins.minerva.base.styles/ui.less index 2b372ffee..1fbcec73b 100644 --- a/resources/skins.minerva.base.styles/ui.less +++ b/resources/skins.minerva.base.styles/ui.less @@ -444,7 +444,7 @@ input.search { .image-list, .pre-content, // Form only pages e.g Special:MobileOptions -#mw-content-text > form .oo-ui-fieldLayout-body, +#mw-content-text > form > .oo-ui-fieldLayout > .oo-ui-fieldLayout-body, // Save button on Special:MobileOptions #mw-content-text > form > .oo-ui-widget, .content, diff --git a/skinStyles/mediawiki.action.edit.styles/minerva.less b/skinStyles/mediawiki.action.edit.styles/minerva.less index cfd634d8b..a7366feed 100644 --- a/skinStyles/mediawiki.action.edit.styles/minerva.less +++ b/skinStyles/mediawiki.action.edit.styles/minerva.less @@ -1,20 +1,15 @@ // Additional Styles for no-js editing mode @import 'minerva.mixins'; -#wpTextbox1 { - border: 1px solid @colorGray12; -} +.mw-editform { + .editHelp, .cancelLink { + display: none; + } -.editHelp, .cancelLink { - display: none; -} - -.editButtons input, .editButtons a { - margin-top: 10px; -} - -textarea.mw-ui-input { - max-height: 14em; + > #wpTextbox1 { + border: 1px solid @colorGray12; + max-height: 70vh; + } } .action-submit, @@ -30,12 +25,11 @@ textarea.mw-ui-input { font-weight: bold; } - .editCheckboxes { - margin-top: 8px; - } - #mw-anon-edit-warning { padding: 8px; + > p { + margin: 0; + } } // Parsing information doesn't need to be so big