docs: improve styling for form submission example (#2899)

![before](https://github.com/user-attachments/assets/3936dcc6-d9f4-49e3-8b53-973a21eaadcd)

![after](https://github.com/user-attachments/assets/8abdb950-6473-4f0a-a27d-4a8b09229a57)

## Changes
- Added border and padding to the search input field for better
visibility
- Added light gray background and border to the search button for better
clickability

## Why
- The original styling makes it difficult to recognize the search input
field and button, as they appear as plain text elements without any
visual distinction.
This commit is contained in:
zhizheng
2025-05-08 11:54:12 +02:00
committed by GitHub
parent 54d18d8bca
commit 2b0f76be62
2 changed files with 6 additions and 3 deletions
Generated
+2 -1
View File
@@ -14,6 +14,7 @@
"jsr:@std/async@1": "1.0.12",
"jsr:@std/bytes@^1.0.2": "1.0.5",
"jsr:@std/bytes@^1.0.5": "1.0.5",
"jsr:@std/cli@1": "1.0.17",
"jsr:@std/cli@^1.0.17": "1.0.17",
"jsr:@std/collections@^1.0.11": "1.0.11",
"jsr:@std/crypto@1": "1.0.4",
@@ -215,7 +216,7 @@
"@std/http@1.0.15": {
"integrity": "435a4934b4e196e82a8233f724da525f7b7112f3566502f28815e94764c19159",
"dependencies": [
"jsr:@std/cli",
"jsr:@std/cli@^1.0.17",
"jsr:@std/encoding@^1.0.10",
"jsr:@std/fmt@^1.0.7",
"jsr:@std/html@^1.0.3",
@@ -53,8 +53,10 @@ export default function Page({ data }: PageProps<Data>) {
return (
<div>
<form>
<input type="text" name="q" value={query} />
<button type="submit">Search</button>
<input type="text" name="q" value={query} class="border p-1" />
<button type="submit" class="ml-1 px-2 py-1 bg-gray-100 border">
Search
</button>
</form>
<ul>
{results.map((name) => <li key={name}>{name}</li>)}