diff options
| author | 2026-01-15 16:53:28 +0800 | |
|---|---|---|
| committer | 2026-01-15 17:36:39 +0800 | |
| commit | dc10653b2b9b164b0e5adf8307f022b3eb21aa61 (patch) | |
| tree | 7845878e9449017b9a9768543597524161974631 /ui/src | |
| parent | 43317e79866e11614735067746af59555034548f (diff) | |
| download | DropOut-dc10653b2b9b164b0e5adf8307f022b3eb21aa61.tar.gz DropOut-dc10653b2b9b164b0e5adf8307f022b3eb21aa61.zip | |
feat: Add custom styles for select elements, dropdowns, and global scrollbars to enhance UI consistency and user experience
Diffstat (limited to 'ui/src')
| -rw-r--r-- | ui/src/app.css | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/ui/src/app.css b/ui/src/app.css index 2ea9a8c..5d0404b 100644 --- a/ui/src/app.css +++ b/ui/src/app.css @@ -1,3 +1,120 @@ @import "tailwindcss"; @variant dark (&:where(.dark, .dark *)); + +/* ==================== Custom Select/Dropdown Styles ==================== */ + +/* Base select styling */ +select { + appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 0.5rem center; + background-size: 1rem; + padding-right: 2rem; +} + +/* Custom scrollbar for dropdowns and lists */ +select, +.custom-select { + scrollbar-width: thin; + scrollbar-color: #3f3f46 #18181b; +} + +/* Webkit scrollbar for select (when expanded, browser-dependent) */ +select::-webkit-scrollbar { + width: 8px; +} + +select::-webkit-scrollbar-track { + background: #18181b; +} + +select::-webkit-scrollbar-thumb { + background-color: #3f3f46; + border-radius: 4px; +} + +select::-webkit-scrollbar-thumb:hover { + background-color: #52525b; +} + +/* Option styling (limited browser support but good for Tauri/WebView) */ +select option { + background-color: #18181b; + color: #e4e4e7; + padding: 8px 12px; +} + +select option:hover, +select option:focus, +select option:checked { + background: linear-gradient(#3730a3, #3730a3); + color: white; +} + +/* ==================== Custom Scrollbar (Global) ==================== */ + +/* Firefox */ +* { + scrollbar-width: thin; + scrollbar-color: #3f3f46 transparent; +} + +/* Webkit browsers */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background-color: #3f3f46; + border-radius: 4px; + border: 2px solid transparent; + background-clip: content-box; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #52525b; +} + +::-webkit-scrollbar-corner { + background: transparent; +} + +/* ==================== Input/Form Element Consistency ==================== */ + +input[type="text"], +input[type="number"], +input[type="password"], +input[type="email"], +textarea { + background-color: rgba(0, 0, 0, 0.4); + border: 1px solid rgba(255, 255, 255, 0.1); + transition: border-color 0.2s ease, box-shadow 0.2s ease; +} + +input[type="text"]:focus, +input[type="number"]:focus, +input[type="password"]:focus, +input[type="email"]:focus, +textarea:focus { + border-color: rgba(99, 102, 241, 0.5); + box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1); + outline: none; +} + +/* Number input - hide spinner */ +input[type="number"]::-webkit-outer-spin-button, +input[type="number"]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type="number"] { + -moz-appearance: textfield; +} |