v4: a playlist's edit form is a .form like the dump's, and its dumps keep the header's edges — the editor laid the cover beside its fields with display: contents, which on a phone left them a squeezed column, and drew its own inputs: the title and the slug both in bold large type, the description in another size, only the slug labelled, and a segmented control styled apart. It now stacks the shared fields, each under its label (Cover, Title with its counter, Link, Description, the visibility toggle), over the action row, as DumpEdit does, and takes the header's whole card. The dumps' drag handle and remove button took width from the cards, which sat inset from the header on both sides; they now sit in the page's side padding (--page-gutter, which .page-content now names), so the cards line up with the header at any width. Undo shows as a small btn-primary over the card it would bring back, instead of a third control beside it. CountedInput, VisibilitySegmented and the .playlist-edit-* rules had no other users and are gone. 669 frontend tests pass, and tsc, eslint, deno fmt, doc:lint and i18n:compile --strict are clean; checked in screenshots in all six styles at 390px, Kanagawa and Smooth at desktop widths too, Undo in Smooth and GeoCities.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
121
src/App.css
121
src/App.css
@@ -265,9 +265,7 @@
|
||||
Each rule below adds only its own size / weight / width deltas. */
|
||||
.dump-title-input,
|
||||
.profile-email-input,
|
||||
.username-field-input,
|
||||
.playlist-edit-input,
|
||||
.playlist-edit-textarea {
|
||||
.username-field-input {
|
||||
border: var(--border-width) solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--color-surface-sunken);
|
||||
@@ -279,9 +277,7 @@
|
||||
|
||||
.dump-title-input:focus,
|
||||
.profile-email-input:focus,
|
||||
.username-field-input:focus,
|
||||
.playlist-edit-input:focus,
|
||||
.playlist-edit-textarea:focus {
|
||||
.username-field-input:focus {
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
|
||||
@@ -2711,7 +2707,8 @@ body.has-player .chat-fab {
|
||||
width: 100%;
|
||||
max-width: 860px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.25rem 0;
|
||||
--page-gutter: 1.25rem;
|
||||
padding: 2rem var(--page-gutter) 0;
|
||||
box-sizing: border-box;
|
||||
animation: page-enter 0.2s ease both;
|
||||
display: flex;
|
||||
@@ -5308,11 +5305,6 @@ body.has-player .chat-fab {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.playlist-detail-title-row .playlist-edit-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.playlist-detail-title {
|
||||
margin: 0;
|
||||
font-size: var(--text-2xl);
|
||||
@@ -5370,41 +5362,12 @@ body.has-player .chat-fab {
|
||||
var(--dur-base);
|
||||
}
|
||||
|
||||
.playlist-edit-btn:hover,
|
||||
.playlist-cancel-btn:hover {
|
||||
.playlist-edit-btn:hover {
|
||||
opacity: 1;
|
||||
border-color: var(--color-accent);
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.playlist-edit-input,
|
||||
.playlist-edit-textarea {
|
||||
width: 100%;
|
||||
font-size: var(--text-md);
|
||||
padding: 0.4rem 0.65rem;
|
||||
}
|
||||
|
||||
.playlist-edit-textarea {
|
||||
resize: none;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.playlist-edit-input {
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Inline edit form: stack the fields with a little more breathing room than
|
||||
the tight display layout, and let the action row sit at the bottom. */
|
||||
.playlist-edit-content {
|
||||
gap: 0.7rem;
|
||||
}
|
||||
|
||||
.playlist-detail-meta .playlist-edit-toggle {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ── Playlist dump list ── */
|
||||
.playlist-dump-list {
|
||||
display: flex;
|
||||
@@ -5413,31 +5376,55 @@ body.has-player .chat-fab {
|
||||
}
|
||||
|
||||
.playlist-dump-item {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0 0.25rem;
|
||||
transition: background var(--dur-base);
|
||||
border-radius: var(--radius-xl);
|
||||
}
|
||||
|
||||
/* For those who may edit the playlist, each card has a drag handle on its
|
||||
left and a remove button on its right. They sit in the page's side
|
||||
padding, so the cards keep the header's edges. Undo shows over the card it
|
||||
would bring back, dimmed during its cooldown. */
|
||||
.playlist-dump-list--editable .playlist-dump-item {
|
||||
grid-template-columns: var(--page-gutter) minmax(0, 1fr) var(--page-gutter);
|
||||
margin-inline: calc(-1 * var(--page-gutter));
|
||||
}
|
||||
|
||||
.playlist-dump-item .dump-card {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.playlist-dump-list--editable .playlist-dump-item .dump-card {
|
||||
grid-area: 1 / 2;
|
||||
}
|
||||
|
||||
.playlist-dump-item--drag-over {
|
||||
background: color-mix(in srgb, var(--color-accent) 12%, transparent);
|
||||
outline: 2px dashed var(--color-accent);
|
||||
}
|
||||
|
||||
.playlist-dump-item .dump-card {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
.drag-handle {
|
||||
grid-column: 1;
|
||||
justify-self: center;
|
||||
cursor: grab;
|
||||
opacity: 0.35;
|
||||
font-size: var(--text-lg);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.drag-handle:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
/* ── Playlist dump item action buttons ── */
|
||||
.playlist-remove-btn {
|
||||
flex-shrink: 0;
|
||||
grid-column: 3;
|
||||
align-self: stretch;
|
||||
padding: 0;
|
||||
color: var(--color-text);
|
||||
opacity: 0.4;
|
||||
font-size: var(--text-sm);
|
||||
padding: 0.25rem 0.35rem;
|
||||
}
|
||||
|
||||
.playlist-remove-btn:hover {
|
||||
@@ -5445,32 +5432,12 @@ body.has-player .chat-fab {
|
||||
color: var(--color-danger);
|
||||
}
|
||||
|
||||
.playlist-cancel-btn {
|
||||
flex-shrink: 0;
|
||||
background: none;
|
||||
border: 1px solid var(--color-border-subtle);
|
||||
cursor: pointer;
|
||||
color: var(--color-text);
|
||||
opacity: 0.7;
|
||||
font-size: var(--text-xs);
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: opacity var(--dur-base), border-color var(--dur-base), color
|
||||
var(--dur-base);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.drag-handle {
|
||||
cursor: grab;
|
||||
opacity: 0.35;
|
||||
font-size: var(--text-lg);
|
||||
flex-shrink: 0;
|
||||
user-select: none;
|
||||
padding: 0 0.25rem;
|
||||
}
|
||||
|
||||
.drag-handle:active {
|
||||
cursor: grabbing;
|
||||
.playlist-undo-btn {
|
||||
grid-area: 1 / 2;
|
||||
justify-self: center;
|
||||
/* Over the card, which is positioned. */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* ── Add to playlist button (dump detail) ── */
|
||||
|
||||
Reference in New Issue
Block a user