style: enhance textarea styling and add auto-resize functionality

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-05 00:02:36 +08:00
1 parent f90df8df91
commit f738eb1886
1 file changed
+7 -1
+7 -1
View File
@@ -38,7 +38,13 @@
</div> </div>
<div> <div>
<label for="submit_body" class="block text-sm font-medium text-primary mb-1">Body</label> <label for="submit_body" class="block text-sm font-medium text-primary mb-1">Body</label>
<textarea id="submit_body" name="body" rows="5" placeholder="Enter the post content" class="w-full text-primary text-sm px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs" required></textarea> <textarea id="submit_body"
name="body"
rows="5"
placeholder="Enter the post content"
class="w-full text-primary text-sm px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs resize-none overflow-hidden"
oninput="this.style.height = 'auto'; this.style.height = this.scrollHeight + 'px';"
required></textarea>
<p class="mt-1 text-xs text-text-muted">Must be at least 8 characters long.</p> <p class="mt-1 text-xs text-text-muted">Must be at least 8 characters long.</p>
</div> </div>
<!-- Optional: Add an error message placeholder if needed --> <!-- Optional: Add an error message placeholder if needed -->