Skip to content

Commit cf9cabb

Browse files
authored
fix: search bar width, font-mono inputs, dark mode placeholder color (#61)
1 parent c505380 commit cf9cabb

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

frontend/src/components/ContractTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
} from '../constants/contractVerification';
1212

1313
const themedInputClassName =
14-
'w-full bg-dark-700/80 backdrop-blur border border-dark-500 px-3 py-2 text-sm text-fg placeholder-gray-500 rounded-xl shadow-md shadow-black/20 focus:outline-none focus:border-accent-primary focus:ring-2 focus:ring-accent-primary/40 transition';
14+
'w-full bg-dark-700/80 backdrop-blur border border-dark-500 px-3 py-2 text-sm text-fg placeholder-gray-500 rounded-xl shadow-md shadow-black/20 focus:outline-none focus:border-accent-primary focus:ring-2 focus:ring-accent-primary/40 transition font-mono';
1515

16-
const themedMonoInputClassName = `${themedInputClassName} font-mono`;
16+
const themedMonoInputClassName = themedInputClassName;
1717

1818
interface Props {
1919
address: string;

frontend/src/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default function Layout() {
211211
{!isHome && (
212212
<div className="bg-dark-800/40">
213213
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex justify-center">
214-
<div className="w-full md:w-96">
214+
<div className="w-full md:w-[560px]">
215215
<SearchBar />
216216
</div>
217217
</div>

frontend/src/components/SearchBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ export default function SearchBar() {
191191
value={query}
192192
onChange={(e) => setQuery(e.target.value)}
193193
onKeyDown={onKeyDown}
194-
placeholder="Search Address / Tx Hash / Block / Token / NFT"
195-
className="search-input w-full bg-dark-700/80 backdrop-blur border border-dark-500 px-4 py-2 pl-10 text-sm rounded-full shadow-md shadow-black/20 focus:outline-none focus:border-accent-primary focus:ring-2 focus:ring-accent-primary/40 transition"
194+
placeholder="Search Address/Tx Hash/Block/Token/NFT"
195+
className="search-input w-full bg-dark-700/80 backdrop-blur border border-dark-500 px-4 py-2 pl-10 text-sm rounded-full shadow-md shadow-black/20 focus:outline-none focus:border-accent-primary focus:ring-2 focus:ring-accent-primary/40 transition font-mono"
196196
/>
197197
<svg
198198
className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"

frontend/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
:root:not([data-theme='light']) .text-gray-700 {
6767
color: rgb(248 250 252 / var(--tw-text-opacity, 1));
6868
}
69+
70+
/* Match form input placeholder brightness to search bar in dark mode. */
71+
:root:not([data-theme='light']) input::placeholder,
72+
:root:not([data-theme='light']) textarea::placeholder {
73+
color: rgb(255 255 255 / 0.72);
74+
}
6975
}
7076

7177
@layer components {

0 commit comments

Comments
 (0)