mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
fix(edit): one field shape for the record settings popover
Every field now renders as a 150px label column plus a control column, so the Featured checkbox no longer inherits the 220px text-input width and its row shares the grid with Category/Location/Logo. Project section rows become a 5-column grid with named areas (id, type, up, down, remove) that reflows to two rows at <=520px; the close button is a 28px target and inputs/selects get the same :focus-visible ring as the rest of the edit chrome.
This commit is contained in:
1 parent
ee3e85bf4a
commit
3126971852
2 files changed
+87
-10
No files matched your search
+84
-7
@@ -2454,13 +2454,18 @@
|
||||
}
|
||||
|
||||
.record-settings-close {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
background: none;
|
||||
color: var(--text-muted);
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -2469,6 +2474,11 @@
|
||||
border-color: var(--error);
|
||||
}
|
||||
|
||||
.record-settings-close:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.record-settings-group-title {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
@@ -2477,21 +2487,47 @@
|
||||
margin: 12px 0 6px;
|
||||
}
|
||||
|
||||
/* One field shape for every panel: a label column and a control column, so a
|
||||
checkbox, a select and a text input all start at the same x. The checkbox is
|
||||
an 18px box in the control column — the old `min-width: 220px` applied to
|
||||
every input, which made the featured checkbox 220px wide. */
|
||||
.record-settings-field {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 150px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.record-settings-field input,
|
||||
.record-settings-field > span {
|
||||
font-size: var(--text-meta);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.record-settings-field input[type='text'],
|
||||
.record-settings-field select {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
background: var(--bg-surface);
|
||||
color: inherit;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.record-settings-field input[type='checkbox'] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: 0;
|
||||
accent-color: var(--accent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.record-settings-field input:focus-visible,
|
||||
.record-settings-field select:focus-visible,
|
||||
.record-settings-row select:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.record-settings-list {
|
||||
@@ -2502,8 +2538,19 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* The add control sits under the list it extends, not beside its last row. */
|
||||
.record-settings .edit-add-inline {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
/* A section row is a five-column grid — id | type | up | down | delete. The
|
||||
control columns are fixed, so every id ellipsizes at the same x and every
|
||||
select opens at the same x. Below the dialog's own width the type select
|
||||
takes a row of its own and the controls stay on the id's row. */
|
||||
.record-settings-row {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) repeat(3, 22px);
|
||||
grid-template-areas: "id type up down remove";
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border: 1px solid var(--border);
|
||||
@@ -2512,6 +2559,9 @@
|
||||
}
|
||||
|
||||
.record-settings-row select {
|
||||
grid-area: type;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
background: var(--bg-surface);
|
||||
color: inherit;
|
||||
border: 1px solid var(--border);
|
||||
@@ -2519,13 +2569,40 @@
|
||||
padding: 3px 6px;
|
||||
}
|
||||
|
||||
.record-settings-move-up {
|
||||
grid-area: up;
|
||||
}
|
||||
|
||||
.record-settings-move-down {
|
||||
grid-area: down;
|
||||
}
|
||||
|
||||
.record-settings-row .edit-record-remove {
|
||||
grid-area: remove;
|
||||
}
|
||||
|
||||
.record-settings-id {
|
||||
grid-area: id;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 220px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.record-settings-field {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.record-settings-row {
|
||||
grid-template-columns: minmax(0, 1fr) repeat(3, 22px);
|
||||
grid-template-areas:
|
||||
"id up down remove"
|
||||
"type type type type";
|
||||
}
|
||||
}
|
||||
|
||||
/* Field-by-field conflict view (E8). */
|
||||
|
||||
Reference in new issue
Block a user