From 9753da8fdd4601a19e071170f33bfe038885a137 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Thu, 20 Jul 2017 09:52:21 +0200 Subject: [PATCH] NewDesign Form: move margin from label to input provide beautiful layouts with or without label between inputs --- app/assets/stylesheets/new_design/forms.scss | 6 +----- app/views/root/patron.html.haml | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/new_design/forms.scss b/app/assets/stylesheets/new_design/forms.scss index e1616d1e7..a04982b7f 100644 --- a/app/assets/stylesheets/new_design/forms.scss +++ b/app/assets/stylesheets/new_design/forms.scss @@ -11,11 +11,6 @@ font-size: 14px; } - label, - input[type=submit] { - margin-top: 24px; - } - label { margin-bottom: 8px; display: inline-block; @@ -28,6 +23,7 @@ width: 100%; border-radius: 4px; border: solid 1px $border-grey; + margin-bottom: 24px; padding: 16px; &:disabled { diff --git a/app/views/root/patron.html.haml b/app/views/root/patron.html.haml index 2760b53d1..5b5bbe7c4 100644 --- a/app/views/root/patron.html.haml +++ b/app/views/root/patron.html.haml @@ -5,8 +5,7 @@ %form.form %label Nom %input{ type: "text" } - %label Prénom - %input{ type: "text", placeholder: "ex : Ivan" } + %input{ type: "text", placeholder: "Prénom: Ivan" } %label Mot de passe %input{ type: "password", value: "12345678" } %input.button{ type: "submit", value: "Envoyer" }