diff --git a/src/app/globals.css b/src/app/globals.css index 9ceb4f9..ece39bc 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -62,11 +62,13 @@ table { table th, table td { border: 1px solid var(--border-color); - padding: var(--spacing-sm); + padding: 0; text-align: left; vertical-align: top; position: relative; min-width: 120px; + min-height: 2.5rem; + background-color: transparent; } table th { @@ -144,38 +146,43 @@ table th { EDITABLE CELL STYLES ================================= */ +/* Spreadsheet-like cell styling */ .editable-cell { - position: relative; width: 100%; - min-height: 2rem; + height: 100%; + min-height: 2.5rem; + display: flex; + align-items: center; + padding: 0.5rem; + position: relative; } .editable-cell input, .editable-cell textarea { width: 100%; + height: 100%; + background: transparent; border: none; outline: none; - background: transparent; - resize: none; - padding: var(--spacing-xs); font-family: inherit; font-size: inherit; - transition: all 0.2s ease-in-out; + color: inherit; + padding: 0; + margin: 0; + resize: none; } -.editable-cell input:focus, -.editable-cell textarea:focus { - background-color: #fef3c7; - border: 2px solid var(--color-warning); - border-radius: var(--border-radius); +/* Subtle focus state for the entire cell */ +.editable-cell:focus-within { + background-color: rgba(59, 130, 246, 0.05); /* Very subtle blue tint */ } -.focused-cell { - background-color: #fef3c7 !important; - border: 2px solid var(--color-warning) !important; - border-radius: var(--border-radius); +/* Dark mode focus state */ +.dark .editable-cell:focus-within { + background-color: rgba(59, 130, 246, 0.1); } + /* ================================= TYPEAHEAD STYLES ================================= */ diff --git a/src/components/EditableCell.tsx b/src/components/EditableCell.tsx index 14cb15a..4b45ed4 100644 --- a/src/components/EditableCell.tsx +++ b/src/components/EditableCell.tsx @@ -102,8 +102,9 @@ export function EditableCell({ }, [inputType, commitInput, setFocusedCell, value]); const baseClassName = ` - w-full px-2 py-1 border-none outline-none resize-none - focus:ring-2 focus:ring-blue-500 focus:ring-inset + w-full h-full bg-transparent text-inherit + border-none outline-none focus:outline-none resize-none + placeholder:text-gray-400 dark:placeholder:text-gray-500 ${className} `.trim(); @@ -118,8 +119,8 @@ export function EditableCell({ onBlur={handleBlur} onKeyDown={handleKeyDown} placeholder={placeholder} - className={`${baseClassName} min-h-[2rem] max-h-32`} - rows={1} + className={baseClassName} + style={{ minHeight: '2.5rem' }} /> ); diff --git a/src/components/TypeaheadInput.tsx b/src/components/TypeaheadInput.tsx index 6a856ef..7618db3 100644 --- a/src/components/TypeaheadInput.tsx +++ b/src/components/TypeaheadInput.tsx @@ -331,10 +331,9 @@ export function TypeaheadInput({ }, []); const baseInputClassName = ` - w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg - bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 - focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 - transition-all duration-200 ease-in-out + w-full h-full bg-transparent text-inherit + border-none outline-none focus:outline-none + placeholder:text-gray-400 dark:placeholder:text-gray-500 ${className} `.trim(); @@ -469,7 +468,7 @@ export function TypeaheadInput({ }; return ( -
+