From 6db1a4fcc019819bcbfc6a3558c7cfaecee58df4 Mon Sep 17 00:00:00 2001 From: Falk Graepel Date: Thu, 14 May 2026 15:10:35 +0200 Subject: [PATCH] fix bright items --- src/app.css | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index 521cf8f..4642924 100644 --- a/src/app.css +++ b/src/app.css @@ -1,7 +1,10 @@ :root { + color-scheme: dark; --bg: #12121a; --surface: #1c1c28; --surface-2: #252532; + --input-bg: #252532; + --input-border: #3a3a4d; --border: #3a3a4d; --text: #e8e8ef; --muted: #9a9ab0; @@ -12,6 +15,8 @@ --danger: #e86c6c; --radius: 10px; --font: system-ui, 'Segoe UI', Roboto, Ubuntu, Cantarell, sans-serif; + /* Chevron for native selects (light on dark) */ + --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239a9ab0' d='M0 1h10L5 6z'/%3E%3C/svg%3E"); } *, @@ -53,6 +58,53 @@ textarea { color: inherit; } +/* Native form controls: avoid OS light theme on selects, text fields, number spinners */ +input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']), +select, +textarea { + background-color: var(--input-bg); + color: var(--text); + border: 1px solid var(--input-border); + border-radius: 8px; + padding: 0.45rem 0.55rem; +} + +select { + appearance: none; + -webkit-appearance: none; + background-color: var(--input-bg); + background-image: var(--select-chevron); + background-repeat: no-repeat; + background-position: right 0.55rem center; + padding-right: 2rem; + cursor: pointer; +} + +select:focus, +input:not([type='checkbox']):not([type='radio']):focus, +textarea:focus { + outline: 2px solid var(--accent-dim); + outline-offset: 1px; + border-color: var(--accent-dim); +} + +option, +optgroup { + background-color: var(--surface); + color: var(--text); +} + +/* Number inputs: remove bright WebKit/Legacy spinners (use keyboard or type values) */ +input[type='number'] { + -moz-appearance: textfield; + appearance: textfield; +} +input[type='number']::-webkit-outer-spin-button, +input[type='number']::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + button { cursor: pointer; } @@ -109,8 +161,9 @@ button { .field textarea { padding: 0.45rem 0.55rem; border-radius: 8px; - border: 1px solid var(--border); - background: var(--bg); + border: 1px solid var(--input-border); + background: var(--input-bg); + color: var(--text); } .grid-2 {