refactor(web): page skeleton as Tailwind utilities
Decks, page bars, sections, heads, status slots and group notes move out of components.css into Deck, PageBar, Section, Rows and friends. The theme gains the geometry tokens and the container widths. Refs #280 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5528ac8aa8
commit
db22e4a1d2
+6
-161
@@ -91,6 +91,9 @@
|
||||
--space-12: 3rem;
|
||||
|
||||
--radius: 4px;
|
||||
--deck-max: 68rem;
|
||||
/* a readable line of prose */
|
||||
--measure: 65ch;
|
||||
--ease-out: cubic-bezier(0.25, 1, 0.5, 1);
|
||||
|
||||
/* geometry: a 44px touch target, a 24px chip, one row height */
|
||||
@@ -183,9 +186,8 @@ body {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* hidden wins over every display rule a component sets; the one exception is
|
||||
a status slot, which keeps its line while empty */
|
||||
[hidden]:not(.deck-status) {
|
||||
/* hidden wins over every display rule a component sets, utilities included */
|
||||
[hidden] {
|
||||
/* biome-ignore lint/complexity/noImportantStyles: `hidden` must beat component display rules */
|
||||
display: none !important;
|
||||
}
|
||||
@@ -1081,151 +1083,6 @@ button.chip {
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- decks, pages, sections --------------------------------------------- */
|
||||
|
||||
.deck {
|
||||
container-type: inline-size;
|
||||
width: 100%;
|
||||
max-width: 68rem;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-4) 0 var(--space-12);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* the gutter belongs to the content, so a hero can still reach both edges */
|
||||
.deck > * {
|
||||
margin-inline: var(--gutter);
|
||||
}
|
||||
|
||||
.deck > section.hero {
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
.deck.detail {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.page-bar .page-title {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
/* a page's line: title, count, a one-line status slot, the page's controls */
|
||||
.page-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
min-height: var(--control-h);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.page-bar .deck-count {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* always laid out, so a message never pushes the page down */
|
||||
.head-status {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.head-status[data-tone="fault"] {
|
||||
color: var(--signal-fault);
|
||||
}
|
||||
|
||||
/* a section's status: one reserved line, wraps only when the sentence must */
|
||||
.deck-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2) var(--space-3);
|
||||
min-height: 1.5rem;
|
||||
margin-bottom: var(--space-3);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.deck-status[hidden] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.deck-status[data-tone="fault"],
|
||||
.head-status[data-tone="fault"] {
|
||||
color: var(--signal-fault);
|
||||
}
|
||||
|
||||
.deck-status .lamp,
|
||||
.head-status .lamp {
|
||||
display: inline-block;
|
||||
margin-right: var(--space-2);
|
||||
}
|
||||
|
||||
.deck-group {
|
||||
margin-bottom: var(--space-8);
|
||||
}
|
||||
|
||||
.deck-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
min-height: var(--control-h);
|
||||
padding-bottom: var(--space-1);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.deck-head .head-action,
|
||||
.deck-head .disclose {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* nested heads inside a section are group labels, one step quieter */
|
||||
.deck-group .deck-group .deck-head {
|
||||
min-height: var(--chip-h);
|
||||
padding-top: var(--space-3);
|
||||
}
|
||||
|
||||
.deck-rows {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* one plain sentence, the long form behind a tap */
|
||||
.group-note {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-1) var(--space-2);
|
||||
padding: var(--space-2) 0 0;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.group-note p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.group-note .group-note-more {
|
||||
flex-basis: 100%;
|
||||
max-width: 65ch;
|
||||
font-size: var(--text-xs);
|
||||
}
|
||||
|
||||
.group-note .control-icon {
|
||||
width: var(--chip-h);
|
||||
min-width: var(--chip-h);
|
||||
min-height: var(--chip-h);
|
||||
border-color: transparent;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
/* ---- the row ------------------------------------------------------------------ */
|
||||
|
||||
/* lead | body | actions, then the tray full width. The body is minmax(0, 1fr):
|
||||
@@ -1682,7 +1539,7 @@ button.chip {
|
||||
|
||||
/* ---- poster grid (§9.6, issue 151) -------------------------------------- */
|
||||
|
||||
.deck-rows.grid-rows {
|
||||
.grid-rows {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
|
||||
gap: var(--space-3);
|
||||
@@ -2324,14 +2181,6 @@ button.chip {
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.subs-panel .deck-group {
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.subs-panel .deck-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.subs-present {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -2384,10 +2233,6 @@ button.chip {
|
||||
margin-top: var(--space-3);
|
||||
}
|
||||
|
||||
.subs-buckets .deck-group {
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
/* ---- settings (issue #116) -------------------------------------------- */
|
||||
|
||||
.form-grid {
|
||||
|
||||
Reference in New Issue
Block a user