style: enhance textarea styling and add auto-resize functionality
This commit is contained in:
1 parent
f90df8df91
commit
f738eb1886
1 file changed
+7
-1
@@ -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 -->
|
||||||
|
|||||||
Reference in new issue
Block a user