From 53db95c051a961a891b19f1e58b40c30588a084b Mon Sep 17 00:00:00 2001 From: fkDeath Date: Thu, 7 May 2026 15:33:22 +0200 Subject: [PATCH] =?UTF-8?q?Add=20=E2=94=80=20Full=20form=20styling=20for?= =?UTF-8?q?=20inputs,=20textarea,=20select=20and=20checkbox=20|=20Add=20?= =?UTF-8?q?=E2=94=80=20Focus=20and=20invalid=20input=20states=20|=20Add=20?= =?UTF-8?q?=E2=94=80=20Submit=20and=20reset=20buttons=20with=20form-action?= =?UTF-8?q?s=20layout=20|=20Edit=20=E2=94=80=20Responsive=20form=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/contact.css | 95 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 12 deletions(-) diff --git a/public/css/contact.css b/public/css/contact.css index 4c46852..de8f804 100644 --- a/public/css/contact.css +++ b/public/css/contact.css @@ -58,17 +58,83 @@ body #div-content { box-shadow: 1rem 1rem 0rem #000000; border-radius: 2rem; width: 30rem; - label, input, textarea{ + font-family: Quicksand, sans-serif; + color: #ffffff; + padding: 1rem 0 1.5rem; + + h3 { + margin: 1rem 2rem 0.5rem; + font-size: 1.2rem; + border-bottom: 0.15rem dashed #834206ec; + padding-bottom: 0.5rem; + } + label, input, textarea, select { display: block; - margin: 2rem; - padding-top: 0.1rem; + margin: 1rem 2rem 0.3rem; + padding: 0.4rem; + font-family: inherit; } - input, textarea{ + input[type="text"], input[type="email"], textarea, select { background-color: #1B4056; + color: #ffffff; + border: 0.1rem solid #1B4056; + border-radius: 0.3rem; + width: calc(100% - 4rem); + box-sizing: border-box; } - textarea{ + input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus { + outline: none; + border-color: #834206ec; + } + input:invalid:not(:placeholder-shown) { + border-color: #b34040; + } + textarea { height: 10rem; - width: 25rem; + resize: vertical; + font-family: inherit; + } + .required { + color: #ffb84d; + } + .check-line { + display: flex; + align-items: center; + margin: 1rem 2rem; + gap: 0.6rem; + } + .check-line input[type="checkbox"] { + margin: 0; + width: 1.1rem; + height: 1.1rem; + accent-color: #834206ec; + cursor: pointer; + } + .check-line label { + margin: 0; + padding: 0; + cursor: pointer; + } + .form-actions { + display: flex; + justify-content: flex-end; + gap: 0.8rem; + margin: 1.5rem 2rem 0; + } + input[type="submit"], input[type="reset"] { + display: inline-block; + margin: 0; + padding: 0.5rem 1.2rem; + background-color: #1B4056; + color: #ffffff; + border: 0.1rem solid #834206ec; + border-radius: 0.3rem; + cursor: pointer; + font-family: inherit; + transition: background-color 0.2s ease-out; + } + input[type="submit"]:hover, input[type="reset"]:hover { + background-color: #2a658a; } } @@ -119,16 +185,21 @@ body #div-content { width: 100%; max-width: 30rem; margin: 0 auto; - label, input, textarea { - margin: 1rem; + label, input, textarea, select { + margin-left: 1rem; + margin-right: 1rem; } - textarea { + h3 { + margin-left: 1rem; + margin-right: 1rem; + } + input[type="text"], input[type="email"], textarea, select { width: calc(100% - 2rem); box-sizing: border-box; } - input { - width: calc(100% - 2rem); - box-sizing: border-box; + .check-line, .form-actions { + margin-left: 1rem; + margin-right: 1rem; } }