loopable / web /src /views-trash /trash.css
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
39a9177 verified
Raw History Blame Contribute Delete
5.78 kB
/* -------------------------------------------------------------------------
views-trash/trash.css - W50-T26, ruling R9, contract C4.
DESIGN.md sections 2, 3 and 4, applied:
- type is --lp-fs-* TOKENS ONLY; there is not one literal size here
- colour is --lp-* tokens only; there is not one hex
- hairlines (1px --lp-line), never shadows: this is a PANEL, not an overlay
- 4/8 px spacing grid, --lp-r-lg for the panel and --lp-r-md for controls
- every class-styled <button> resets native chrome in its BASE rule, which
is the wave-19 item-3 defect and the reason that reset is not optional
- motion is 120ms ease-out on opacity/transform only
------------------------------------------------------------------------- */
.vt-panel {
display: flex;
flex-direction: column;
min-width: 0;
max-height: 420px;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-lg);
color: var(--lp-ink);
font-size: var(--lp-fs-sm);
line-height: var(--lp-lh);
overflow: hidden;
}
/* ---- the two tabs ------------------------------------------------------- */
.vt-tabs {
display: flex;
align-items: center;
gap: 4px;
flex: none;
padding: 8px 8px 0;
border-bottom: 1px solid var(--lp-line);
background: var(--lp-wash);
}
.vt-tab {
/* ⛔ THE FOUR-LINE RESET. A class-styled button that does not reset these
leaks the user agent's own chrome, which is the wave-19 item-3 defect. */
border: 0;
background: transparent;
font: inherit;
color: inherit;
appearance: none;
cursor: pointer;
padding: 6px 10px;
border-radius: var(--lp-r-md) var(--lp-r-md) 0 0;
font-size: var(--lp-fs-sm);
color: var(--lp-muted);
transition: opacity 0.12s ease-out;
}
.vt-tab:hover {
color: var(--lp-ink);
}
.vt-tab:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: -2px;
}
.vt-tab-on {
color: var(--lp-ink);
background: var(--lp-surface);
box-shadow: inset 0 -1px 0 0 var(--lp-surface);
}
/* ---- the refusal line --------------------------------------------------- */
.vt-problem {
flex: none;
margin: 8px 12px 0;
padding: 6px 8px;
border-radius: var(--lp-r-md);
background: var(--lp-red-tint);
color: var(--lp-red-deep);
font-size: var(--lp-fs-xs);
}
/* ---- the list ----------------------------------------------------------- */
.vt-pane {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
}
.vt-list {
margin: 0;
padding: 4px 0;
list-style: none;
}
.vt-row,
.vt-trail-row {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-bottom: 1px solid var(--lp-line);
animation: vt-in 0.12s ease-out;
}
.vt-row:last-child,
.vt-trail-row:last-child {
border-bottom: 0;
}
.vt-row:hover {
background: var(--lp-surface-2);
}
.vt-row-mark {
flex: none;
display: inline-flex;
color: var(--lp-muted);
}
.vt-icon {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
stroke-linejoin: round;
}
.vt-row-body,
.vt-trail-row {
min-width: 0;
}
.vt-row-body {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1 1 auto;
}
.vt-trail-row {
flex-direction: column;
align-items: flex-start;
gap: 2px;
}
.vt-name,
.vt-trail-what {
color: var(--lp-ink);
font-size: var(--lp-fs-sm);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
.vt-meta {
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
font-variant-numeric: tabular-nums;
}
.vt-meta time {
font-variant-numeric: tabular-nums;
}
/* ---- restore ------------------------------------------------------------ */
.vt-restore {
border: 0;
background: transparent;
font: inherit;
color: inherit;
appearance: none;
cursor: pointer;
flex: none;
padding: 4px 10px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
transition: background-color 0.12s ease-out;
}
.vt-restore:hover:not(:disabled) {
background: var(--lp-blue-tint);
border-color: var(--lp-blue-deep);
}
.vt-restore:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
.vt-restore:disabled {
cursor: default;
color: var(--lp-muted);
}
/* ---- "Delete forever" (W51-T26, R11) -----------------------------------
⛔ QUIETER THAN RESTORE UNTIL IT IS HOVERED, deliberately. Restore is the
safe act and is the one the row is FOR; the destructive twin sits beside it
in muted ink and only takes the red on hover and focus, so the eye is not
pulled to the button that cannot be taken back. Every colour is an --lp-*
token, exactly as the rest of this sheet. */
.vt-purge {
appearance: none;
cursor: pointer;
flex: none;
padding: 4px 10px;
border: 1px solid transparent;
border-radius: var(--lp-r-md);
background: transparent;
color: var(--lp-muted);
font: inherit;
font-size: var(--lp-fs-xs);
transition: background-color 0.12s ease-out, color 0.12s ease-out;
}
.vt-purge:hover:not(:disabled) {
border-color: var(--lp-red-deep);
color: var(--lp-red-deep);
}
.vt-purge:focus-visible {
outline: 2px solid var(--lp-red-deep);
outline-offset: 1px;
}
.vt-purge:disabled {
cursor: default;
color: var(--lp-muted);
}
/* ---- the empty state: ONE line, never a paragraph ----------------------- */
.vt-empty {
padding: 16px 12px;
color: var(--lp-muted);
font-size: var(--lp-fs-xs);
}
@keyframes vt-in {
from {
opacity: 0;
transform: translateY(2px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
.vt-row,
.vt-trail-row {
animation: none;
}
}