From 1a5cda44b9740d3beeac1b479c5394f4ca360b57 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 5 Aug 2020 12:20:37 -0500 Subject: [PATCH] css: tweak dialog box margins. Tweak margins around dialog boxes to fix some poorly spaced elements, especially around buttons and forms controls. --- app/javascript/src/javascripts/notes.js | 1 - .../src/styles/common/simple_form.scss | 29 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/app/javascript/src/javascripts/notes.js b/app/javascript/src/javascripts/notes.js index 91c736a9a..05e549db2 100644 --- a/app/javascript/src/javascripts/notes.js +++ b/app/javascript/src/javascripts/notes.js @@ -557,7 +557,6 @@ class Note { let $textarea = $(''); $textarea.val(note.original_body); $textarea.css({ - width: "97%", height: "85%", resize: "none", }); diff --git a/app/javascript/src/styles/common/simple_form.scss b/app/javascript/src/styles/common/simple_form.scss index 2b1706df4..9ae65ee57 100644 --- a/app/javascript/src/styles/common/simple_form.scss +++ b/app/javascript/src/styles/common/simple_form.scss @@ -107,10 +107,31 @@ form.one-line-form { } div.ui-dialog { - div.input { - input[type="text"] { - width: 100%; - max-width: 100%; + textarea, input[type="text"] { + width: 100%; + max-width: 100%; + box-sizing: border-box; + } + + form.simple_form { + margin-bottom: 0; + + div.input { + margin-bottom: 0.5em; + } + + div.input.hidden { + display: none; + } + } + + /* the submit and close buttons */ + .ui-dialog-buttonpane { + margin-top: 0; + padding: 1em 1em 0 0; + + .ui-button { + margin: 0 0.25em; } } }