From 124994b01afb15e137e7d8edf2faabce2e63ceff Mon Sep 17 00:00:00 2001 From: MatthiasSaihttam Date: Tue, 17 Nov 2020 17:08:59 -0500 Subject: [PATCH] Post textbox tweaks - Moves them closer to eachother - Makes the extended textbox shorter by default - Removes the ability to manually resize the extended textbox --- main/static/main/post.css | 6 ++---- main/templates/whispermaphone/post.html | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main/static/main/post.css b/main/static/main/post.css index f47894a..8774173 100644 --- a/main/static/main/post.css +++ b/main/static/main/post.css @@ -11,10 +11,8 @@ textarea.thought { font-family: inherit; border-bottom: 1px solid var(--accent-color); border-radius: 0; -} - -.thought#extended_text { - resize: vertical; + overflow-x: hidden; + display: block; } #post-button { diff --git a/main/templates/whispermaphone/post.html b/main/templates/whispermaphone/post.html index 556b954..9f2527d 100644 --- a/main/templates/whispermaphone/post.html +++ b/main/templates/whispermaphone/post.html @@ -24,7 +24,7 @@
{% csrf_token %} - + @@ -64,7 +64,8 @@ } // TODO: Auto-set width of short text box - + //textEl.style.width = "auto"; + //textEl.style.width = textEl.scrollWidth + "px"; }); const textboxes = document.getElementsByClassName("thought");