Files
CatoandClaude 01e42b7dca feat(atlas): a chain reads as a page on a phone — no sheet, one row of tabs (#178)
The owner, from a phone: the slide-out wastes space. It did — a grip and a
3 x 2 tab grid took a quarter of the screen, the chain's name and the diagram
were out of view once it opened, it scrolled inside a page that also scrolled,
the figure boxes repeated the sentence above them, the floating buttons sat on
the text, and "Full evidence / On the globe" repeated under every tab.

- ChainReader replaces the AtlasSheet in the chains view. Below 1024px it is
  the page: the summary, the two ways out once, the route as a tappable strip
  (phones; RouteStrip), the makers in one line (MakersLine), the tabs pinned
  under the top bar, the reading at full width, padded clear of the floating
  buttons. 768-1023px shows the diagram with the reading under it; from
  1024px it is the floating panel as before.
- One row of underlined tabs, all six in view from 360px to 1440px.
- Figures are one row of numbers, value first; money's is one word.


Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 09:54:32 -07:00

190 lines
4.6 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* The reading beside a chain (components/portal/ChainReader.tsx).
*
* < 768 the page itself, top to bottom: the bar, what the chain is, the
* route in one strip, the makers in one line, the tabs pinned
* under the top bar, the reading at full width. No sheet, no
* grip, one scroll — the diagram does not fit a phone, the strip
* says the same route in a line.
* 768–1023 the diagram, then the same reading under it, one column.
* ≥ 1024 a panel floating at the right of the diagram, as before.
*/
@media (max-width: 1023px) {
.atlas[data-view='chain'] {
display: flex;
flex-direction: column;
height: auto;
min-height: 0;
overflow: visible;
background: var(--color-surface-page);
}
.atlas[data-view='chain'] .atlas-bar {
position: relative;
inset: auto;
order: -1;
padding: var(--atlas-gutter) var(--atlas-gutter) 0;
}
.atlas[data-view='chain'] .atlas-canvas-chain {
position: relative;
inset: auto;
padding: 1.5rem var(--atlas-gutter) 0.5rem;
overflow: visible;
}
}
@media (max-width: 767px) {
.atlas[data-view='chain'] .atlas-canvas-chain {
display: none;
}
}
.chain-read {
padding: 1rem 1rem 7rem;
background: var(--color-surface-page);
}
@media (min-width: 768px) and (max-width: 1023px) {
.chain-read {
width: 100%;
max-width: 44rem;
margin-inline: auto;
padding-bottom: 10rem;
}
}
@media (min-width: 1024px) {
.chain-read {
position: absolute;
z-index: 4;
top: var(--atlas-gutter);
right: var(--atlas-gutter);
bottom: var(--atlas-dock);
width: var(--atlas-panel-w);
overflow-y: auto;
overscroll-behavior: contain;
padding: 1.25rem 1.25rem 1.5rem;
border: 1px solid var(--color-border-strong);
border-radius: var(--atlas-radius);
box-shadow: var(--shadow-overlay);
}
}
.chain-read-head {
padding-bottom: 0.75rem;
}
/* The two ways out, once, under the summary. */
.chain-read-actions {
display: flex;
flex-wrap: wrap;
gap: 0 1.25rem;
margin-top: 0.25rem;
}
.chain-read-actions a {
display: inline-flex;
align-items: center;
min-height: var(--size-target);
font-size: 0.875rem;
font-weight: 600;
color: var(--color-fg-primary);
text-decoration: underline;
text-decoration-color: var(--color-border-strong);
text-underline-offset: 0.25em;
}
.chain-read-actions a:hover {
text-decoration-color: currentColor;
}
/* ------------------------------------------------ the route, in one strip */
/* Phones only: from 768px the diagram is on screen and says it better. */
.route-strip {
margin: 0.5rem -1rem 0;
}
.route-strip ol {
display: flex;
align-items: stretch;
gap: 0.375rem;
overflow-x: auto;
padding: 0.25rem 1rem;
scroll-snap-type: x proximity;
scrollbar-width: none;
}
.route-strip ol::-webkit-scrollbar {
display: none;
}
.route-strip li {
display: flex;
flex: none;
align-items: center;
gap: 0.375rem;
scroll-snap-align: start;
}
.route-strip li[data-joiner]::before {
font: var(--text-label)/1 var(--font-mono);
color: var(--color-fg-tertiary);
}
.route-strip li[data-joiner='goes into']::before {
content: '→';
}
.route-strip li[data-joiner='and']::before {
content: '+';
}
.route-strip a {
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.125rem;
width: 8.5rem;
min-height: 3.75rem;
padding: 0.5rem 0.625rem;
border: 1px solid var(--color-border-subtle);
border-radius: var(--atlas-radius);
background: var(--color-surface-raised);
}
.route-strip a[aria-current='page'] {
border-color: var(--color-fg-primary);
background: var(--color-surface-page);
}
.route-strip-meta {
font: var(--text-label)/1.3 var(--font-mono);
color: var(--color-fg-tertiary);
}
.route-strip-name {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
font-size: 0.8125rem;
font-weight: 600;
line-height: 1.3;
color: var(--color-fg-primary);
}
/* Who makes it, in a line. */
.chain-read-makers {
margin-top: 0.75rem;
font-size: 0.875rem;
line-height: 1.6;
color: var(--color-fg-secondary);
}
.chain-read-makers a {
font-weight: 600;
color: var(--color-fg-primary);
text-decoration: underline;
text-decoration-color: var(--color-border-strong);
text-underline-offset: 0.2em;
}
.chain-read-makers-label {
font-family: var(--font-mono);
font-size: var(--text-label);
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--color-fg-tertiary);
}
@media (min-width: 768px) {
.route-strip,
.chain-read-makers {
display: none;
}
}
.chain-read-fine {
margin-top: 1.5rem;
}