From c9113ca09500c5b3cc277fb09b9607a505d39f30 Mon Sep 17 00:00:00 2001 From: BordedDev <> Date: Sat, 8 Mar 2025 18:56:55 +0100 Subject: [PATCH] Tweaked form input styling --- src/snek/static/generic-form.js | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/snek/static/generic-form.js b/src/snek/static/generic-form.js index e71d817..11647dc 100644 --- a/src/snek/static/generic-form.js +++ b/src/snek/static/generic-form.js @@ -75,16 +75,28 @@ class GenericField extends HTMLElement { } input { - width: 90%; - padding: 10px; - margin: 10px 0; - border: 1px solid #333; - border-radius: 5px; - background-color: #1a1a1a; - color: #e6e6e6; - font-size: 1em; + width: 90%; + padding: 10px; + margin: 10px 0; + border: 1px solid #333; + border-radius: 5px; + background-color: #1a1a1a; + color: #e6e6e6; + font-size: 1em; + + &:focus { + outline: 2px solid #f05a28 !important; + } + + &::placeholder { + transition: opacity 0.3s; + } + + &:focus::placeholder { + opacity: 0.4; + } } - + button { width: 50%; padding: 10px;