From b2ff787e32834b2052071161f5b857ce0503a5fb Mon Sep 17 00:00:00 2001 From: Hermann <blumh@student.ethz.ch> Date: Thu, 24 May 2018 00:10:02 +0200 Subject: [PATCH] more dense styling for input fields --- src/views/elements.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/elements.js b/src/views/elements.js index c9c7242..ade6109 100644 --- a/src/views/elements.js +++ b/src/views/elements.js @@ -40,6 +40,10 @@ export class textInput { const attributes = Object.assign({}, attrs); attributes.valid = errors.length === 0; attributes.error = errors.join(', '); + attributes.style = Object.assign({ + 'margin-top': '-10px', + 'margin-bottom': '-10px', + }, attributes.style); attributes.onChange = ({ value }) => { if (value !== this.value) { this.value = value; @@ -59,6 +63,10 @@ export class numInput extends textInput { attributes.type = 'number'; attributes.valid = errors.length === 0; attributes.error = errors.join(', '); + attributes.style = Object.assign({ + 'margin-top': '-10px', + 'margin-bottom': '-10px', + }, attributes.style); attributes.onChange = ({ value }) => { if (value !== this.value) { this.value = value; -- GitLab