From 4d0ba8ef9a376c77b71d5c9ef309ae7ed4542134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Wed, 27 Jan 2021 16:32:21 +0100 Subject: [PATCH] Tweak form layout - Use boldface for labels - Use the equivalent of h4 for the heading - Indent checkbox/radio choices --- snikket_web/scss/app.scss | 24 ++++++++++++++++++------ snikket_web/templates/demo.html | 18 ++++++++++++------ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/snikket_web/scss/app.scss b/snikket_web/scss/app.scss index cbbf2bd..b2948d6 100644 --- a/snikket_web/scss/app.scss +++ b/snikket_web/scss/app.scss @@ -171,10 +171,10 @@ body > footer { @for $n from 1 through 6 { div.form h#{$n}.form-title { - font-size: 100%; - font-weight: bold; - line-height: 1.5; - margin-bottom: 1.5em; + font-size: nth($h-sizes, 4); + /* font-weight: bold; */ + line-height: 1.5 / (nth($h-sizes, 4) / 100%); + margin: 1.5em / (nth($h-sizes, 4) / 100%) 0; } } @@ -224,11 +224,18 @@ div.form { div.form.layout-expanded { label { display: block; + font-weight: bold; color: $gray-200; } + input[type="radio"] + label, input[type="checkbox"] + label { + font-weight: inherit; + color: inherit; + } + div.f-ebox { - margin-bottom: $w-l1; + margin: 1.5em 0; + line-height: 1.5; } div.f-bbox { @@ -242,7 +249,6 @@ div.form.layout-expanded { border: none; border-bottom: $w-s4 solid $primary-500; margin-bottom: -$w-s4; - padding: 0 $w-s3; } input[type=$type].has-error { @@ -258,6 +264,11 @@ div.form.layout-expanded { } } + ul[id] { + padding: $w-s1 0; + padding-left: $w-l1; + } + input[type="checkbox"], input[type="radio"] { position: absolute; z-index: -1; @@ -378,6 +389,7 @@ div.form.layout-expanded { width: 100%; border: none; border-bottom: $w-s4 solid $primary-500; + line-height: 1.5; } textarea:hover { diff --git a/snikket_web/templates/demo.html b/snikket_web/templates/demo.html index 504a6c6..4a9f6c5 100644 --- a/snikket_web/templates/demo.html +++ b/snikket_web/templates/demo.html @@ -145,14 +145,20 @@
- - - + +
- - - + +