mirror of
https://github.com/kbenestad/reimburse.git
synced 2026-06-18 08:04:31 +00:00
Unify height and vertical alignment of all form controls and buttons
Sets a consistent 36px height on inputs, selects, cdd-trigger, and inline .btn elements, with content vertically centred. Excludes .btn-gen and .btn-save CTAs which remain full-padding. Removes redundant inline styles from the New Form button. https://claude.ai/code/session_01MNy1ymwx9URLgXSgHc9W3T
This commit is contained in:
parent
1217bfef12
commit
91a6a2a322
1 changed files with 8 additions and 7 deletions
|
|
@ -29,7 +29,8 @@ body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background:
|
||||||
.fgrp { display: flex; flex-direction: column; min-width: 120px; }
|
.fgrp { display: flex; flex-direction: column; min-width: 120px; }
|
||||||
.fgrp.grow { flex: 1; }
|
.fgrp.grow { flex: 1; }
|
||||||
.fgrp label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; letter-spacing: .3px; }
|
.fgrp label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; letter-spacing: .3px; }
|
||||||
input, select, textarea { padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; font-family: inherit; background: #fff; }
|
input, select, textarea { padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; font-family: inherit; background: #fff; vertical-align: middle; }
|
||||||
|
input:not(textarea), select { height: 36px; padding-top: 0; padding-bottom: 0; }
|
||||||
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,58,92,.1); }
|
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,58,92,.1); }
|
||||||
input[readonly] { background: #f0f1f3; color: var(--muted); }
|
input[readonly] { background: #f0f1f3; color: var(--muted); }
|
||||||
textarea { resize: vertical; min-height: 48px; width: 100%; }
|
textarea { resize: vertical; min-height: 48px; width: 100%; }
|
||||||
|
|
@ -53,15 +54,15 @@ textarea { resize: vertical; min-height: 48px; width: 100%; }
|
||||||
.line-blk + .line-blk { border-top: 1px dashed var(--border); }
|
.line-blk + .line-blk { border-top: 1px dashed var(--border); }
|
||||||
|
|
||||||
/* Buttons */
|
/* Buttons */
|
||||||
.btn { padding: 7px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit; }
|
.btn { height: 36px; padding: 0 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
|
||||||
.btn-add { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }
|
.btn-add { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }
|
||||||
.btn-add:hover { background: rgba(26,58,92,.04); }
|
.btn-add:hover { background: rgba(26,58,92,.04); }
|
||||||
.btn-rm { background: transparent; color: var(--err); font-size: 12px; padding: 4px 8px; }
|
.btn-rm { background: transparent; color: var(--err); font-size: 12px; padding: 0 8px; }
|
||||||
.btn-rm:hover { text-decoration: underline; }
|
.btn-rm:hover { text-decoration: underline; }
|
||||||
.btn-gen { background: var(--accent); color: #fff; font-size: 15px; padding: 12px 32px; width: 100%; margin-top: 16px; border-radius: 6px; }
|
.btn-gen { height: auto; display: block; background: var(--accent); color: #fff; font-size: 15px; padding: 12px 32px; width: 100%; margin-top: 16px; border-radius: 6px; }
|
||||||
.btn-gen:hover { opacity: .9; }
|
.btn-gen:hover { opacity: .9; }
|
||||||
.btn-gen:disabled { opacity: .5; cursor: not-allowed; }
|
.btn-gen:disabled { opacity: .5; cursor: not-allowed; }
|
||||||
.btn-save { background: #2e7d32; color: #fff; font-size: 15px; padding: 12px 32px; border-radius: 6px; }
|
.btn-save { height: auto; display: inline-block; background: #2e7d32; color: #fff; font-size: 15px; padding: 12px 32px; border-radius: 6px; }
|
||||||
.btn-save:hover { opacity: .9; }
|
.btn-save:hover { opacity: .9; }
|
||||||
|
|
||||||
/* Totals */
|
/* Totals */
|
||||||
|
|
@ -75,7 +76,7 @@ textarea { resize: vertical; min-height: 48px; width: 100%; }
|
||||||
|
|
||||||
/* Custom currency dropdown */
|
/* Custom currency dropdown */
|
||||||
.cdd { position: relative; display: inline-block; }
|
.cdd { position: relative; display: inline-block; }
|
||||||
.cdd-trigger { padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; font-family: inherit; text-align: left; min-width: 70px; }
|
.cdd-trigger { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; font-family: inherit; text-align: left; min-width: 70px; display: inline-flex; align-items: center; vertical-align: middle; }
|
||||||
.cdd-trigger:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,58,92,.1); }
|
.cdd-trigger:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,58,92,.1); }
|
||||||
.cdd-panel { display: none; position: absolute; top: calc(100% + 2px); left: 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.14); z-index: 100; min-width: 220px; max-height: 260px; overflow-y: auto; }
|
.cdd-panel { display: none; position: absolute; top: calc(100% + 2px); left: 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.14); z-index: 100; min-width: 220px; max-height: 260px; overflow-y: auto; }
|
||||||
.cdd-panel.open { display: block; }
|
.cdd-panel.open { display: block; }
|
||||||
|
|
@ -469,7 +470,7 @@ function render() {
|
||||||
const staffInput = el('input', {type:'text', value: state.staff, placeholder:'Full name'});
|
const staffInput = el('input', {type:'text', value: state.staff, placeholder:'Full name'});
|
||||||
staffInput.addEventListener('input', () => { state.staff = staffInput.value; localStorage.setItem('reimb-staff', staffInput.value); });
|
staffInput.addEventListener('input', () => { state.staff = staffInput.value; localStorage.setItem('reimb-staff', staffInput.value); });
|
||||||
|
|
||||||
const newFormBtn = el('button', {type:'button', className:'btn btn-save', style:{padding:'7px 14px',fontSize:'13px'}, onClick: onNewForm}, 'New Form');
|
const newFormBtn = el('button', {type:'button', className:'btn btn-save', onClick: onNewForm}, 'New Form');
|
||||||
|
|
||||||
const fromInput = el('input', {type:'date'});
|
const fromInput = el('input', {type:'date'});
|
||||||
fromInput.value = state.periodFrom;
|
fromInput.value = state.periodFrom;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue