Skills

lists-and-tables

A set of things: its rows, a table that fits a phone, sorting, choosing, pages and its states.

When an agent loads it

Builds a set of things as a list or a table: what a row holds and what it opens, numbers that line up, sorting, choosing several rows, pages, a header that stays in view, and the states of a set (loading, failed, empty, no results). A table fits a phone by dropping columns or scrolls in a region of its own, never by squeezing. Ships tested base CSS, a small script and working examples to copy. Use when building or fixing a list, a table, a data grid, a feed, search results or an inbox, or their empty and loading screens; when a table is wider than a phone, a sticky header doesn't stick, numbers don't line up, words break in their middle, a row can't be opened in a new tab, a long name pushes a row apart, or when sorting, filtering, pages or choosing several rows are added.

The base code, running

Compact, 375 wide
Regular, 1024 wide

The same file in two windows, as the skill ships it: assets/index.html. Scroll each and follow its links. Open it on its own to use it with the browser's Back.

Install

npx skills add simon-lund/skills --skill lists-and-tables

The skills CLI puts it where your agent reads skills: Claude Code, Codex, Cursor and the others it knows. npx skills update brings in a later version.

Why it exists

Most screens of an app are a set of things: tasks, messages, invoices, files. An agent gets the first screenshot right and the rest wrong. The table is wider than a phone, a long name pushes the row apart, the header scrolls away, and the empty screen says nothing.

This skill decides five things first: list or table, what a row does, how the set is ordered and narrowed, how a long set is shown, and what each of its states says. Then it copies a base that is measured at phone and desktop width, with long names and large numbers in it.

Where it came from

It is the third of the patterns I asked for on 12 November 2026. Its rules were found one at a time:

  • 10 October 2026: an audit of my component library. On a phone the data table was 673 pixels of content in 350, and the column that names each row scrolled away with the rest. The row of page numbers was wider than the phone.
  • 11 October 2026, the same library with the keyboard alone: at the last page Next switched itself off, and the focus that was on it was gone.
  • 31 October 2026: "twelve dense lines are hard to read". Rows get room.
  • 31 October 2026: the act done most is one tap on the row itself, because opening the thing first was "too many steps for a simple action".
  • 1 November 2026: deleting a row "doesn't need a confirm, just delete it", and offer Undo.
  • 15 November 2026: a list whose rows sat as far apart as its groups couldn't be scanned. Rows close, groups apart.
  • 27 November 2026, measuring this skill's own base: with two of its seven columns dropped, the table made a phone of 320 pixels 346 wide and cut its names in two. Five columns need about 390. So the phone's table keeps three, and the status moves under the name.

Don't squeeze the desktop's columns into a phone. Every word breaks, and no column can be read down.

Do keep what tells the rows apart and the one number. The rest moves under the name or to the row's page.

The rules behind it

  • Do design every state, and keep them distinct: loading (in the real geometry), error (says what to do), empty (says what will appear), data. Plus no-results (never the same as empty), no-access, and busy or failed on the row itself.

    Manifest: Experience

  • Do keep local errors local: a failed row shows its error and a retry, not a banner for the whole page.

    Manifest: Experience

  • Do space a list so it groups: rows close, groups apart (the gap to the next group at least twice the gap to the next row). The title carries the weight; what's under it sits a step quieter. Space before lines. (Gestalt proximity. Klementine, 15 November 2026: Chat's rows sat as far apart as its groups, and the screen couldn't be scanned.)

    Manifest: Visual

  • Do act, then offer Undo, for anything reversible. Ask first only for what can't be undone, or what reaches other people or money. (NN/g on confirmation dialogs.)

    Manifest: Experience

  • Don't put "…" on menu items, underline a back link, or strike through a done task.

    Manifest: Words

  • Do give every layer a visible way out. A gesture is never the only way. (Nielsen: user control and freedom.)

    Manifest: Experience

  • Measure, don't eyeball. Centre optically by the weight of the text, not its box. Keep radii concentric (outer = inner + gap). Line baselines up across columns.

    Manifest: Thoroughness down to the last detail

How to tell it works

  • Before any markup it says whether the set is a list or a table, and what a row opens.
  • At 320 pixels the page doesn't scroll sideways, and no word is cut in its middle.
  • A name of 200 characters ends in an ellipsis, and the row's end stays where it was.
  • Scroll a long table: its header stays. Scroll a wide one sideways: the first column stays.
  • Empty and no results are two screens with different words.
  • It names what it could not check in a desktop browser: a screen reader, and scrolling by touch.

The skill

SKILL.md

Lists and tables: a set of things

Most screens of an app show a set of things: tasks, messages, invoices, files. Each part of such a screen has a settled answer, in Apple's and Material's lists, in the design systems' tables, in the HTML table itself. An agent that derives it anew gets the first screenshot right and the rest wrong: a phone, a name of 200 characters, a thousand rows, no rows.

So don't derive it. Decide five things, copy the base, and check it running. Write each answer down.

This skill stands on app-shell (the frame) and app-navigation (the way to a row's page and back). Their stylesheets are here too, so the examples run on their own.

First look at what the project has. Its own list, table, row or empty-state part comes before this base, and so does a headless table library (TanStack Table is one) for the state of sorting, filtering, pages and choosing. Then take from here what they don't give: the decisions, the traps and the CSS.

1. Decide before any markup

List, table or grid

By how a person reads the set:

A list A table A grid
Read one thing at a time, by its name down a column, one thing against another by what each looks like
For tasks, messages, files, people, results invoices, orders, a report: three or more properties someone compares or sorts by photos, covers
A row a name, one line under it, one fact at its end a cell per property, the name first a picture and a name

A grid has no base here. A table whose rows nobody compares is a list.

What a row does
  • It opens its thing. One link, on the row's name. In a list the whole row is that link's target; in a table the name's cell is.
  • At most one act on the row itself: the one done most (a tick for done). It acts at once and offers Undo; a question is for what can't be undone. Everything else is on the thing's own page. A "more" menu at the row's end hides its acts, so it holds only what is rarely needed.
  • Choosing several rows only where there is something to do with several at once. Then a checkbox on every row, one for all on the page, and a bar that says how many are chosen and holds the acts.
  • A gesture is never the only way to an act. A swipe repeats what a control already does.
How it is ordered and narrowed
  • The order it opens in, in words: newest first, A to Z. Where no column's header shows it, the words stand beside the count.
  • Sorting: in a table by a column's header, one column at a time. The first click gives the order wanted most (A to Z, newest, highest), the second reverses it. In a list, one control among the tools.
  • Narrowing: a few fixed filters are a row of links; a search field comes first among the tools. With a filter on, the count says how many of how many.
  • All of it is in the address (app-navigation): a filter or an order applied is a new entry in the history, each letter typed changes the current one.
How a long set is shown
Pages "Load more" All at once
For comparing, coming back to a place, needing the end: a table, a register looking through one after another: a feed, a catalogue, results a set that stays small: up to a few hundred rows
Its place in the address (?page=3) the number loaded is kept with the history entry the scroll position

Rows that load by themselves as the end comes near are only for alike things looked through without a goal. Never above a footer, which then can't be reached, and never where someone looks for one thing or compares.

What each state says
State When It shows
Loading the rows are on their way, for longer than a second rows of the real geometry, with bars for the words
Failed the request for the set failed what to do, and the control that does it
Empty nothing is here yet what will appear here, and the way to add the first
No results a filter or a search is on and nothing matches what was asked for, and the way to take it off
No access this set isn't this person's to see that, and who can change it
Data otherwise the rows

Two more belong to a single row: busy while its own change is on its way, and failed, with the way to try again, on the row. Never a banner for the page.

2. Copy the base

  • assets/lists-and-tables.css: everything below. Load it after assets/app-shell.css.
  • assets/select.js: "select all", the count and Shift-click, for a page without a framework.
  • assets/index.html: a list in groups, with a filter, a row's own act and a failed row. tasks-overdue.html is its no results, archive.html an empty set, loading.html and error.html the other two states.
  • assets/invoices.html: a table that fits its page, with rows to choose and pages.
  • assets/revenue.html: a table wider than its room, sorted by its headers.

Open them at a phone's width and a desktop's. In an app:

  • A table that fits marks the columns a phone has no room for (set-minor) and repeats what must still be seen on a line under the name (set-under). One column gives way to the others (set-text); numbers are set-num.
  • A table to compare across stands in a workspace (data-shell="workspace"). Its region (set-region) is the part that scrolls, both ways, and the column that names the rows is held (set-hold).
  • The checkboxes and the bar work without a script. In a framework the rest is the component's state: keep the markup and leave select.js out.

Keep every line marked TRAP. If one has to go, say which and why.

3. Two size classes

Shared: the rows, their order, the words, the states.

  • Compact. A list's row is a name, one line under it and one short fact. A table is decided one of two ways, by what it is for:

    • to find a row and open it: the columns that tell the rows apart and the one number stay. The rest is dropped, and what must still be seen moves under the name. What remains fits 320 pixels with its words whole.
    • to compare across columns: every column stays, the region scrolls sideways and the first column is held.

    Pages are Previous, "Page 2 of 7" and Next.

  • Regular. A list is at most 48rem wide and a table 80rem, so a row's two ends stay in one glance. A table shows all its columns; pages show their numbers.

  • The set answers to the room it has, not to the window. Beside a sidebar a table is still in its compact form in a window 950 pixels wide. The base's switch is at 45rem of room, a number for about seven columns: a table with more needs a higher one.

4. The traps

Check each on the running app. Each is a yes or a finding. references/traps.md has what you see when it's wrong, why, the fix and its source.

  1. One link per row, and in a list the whole row is its target. No click handler on the row, no link around other controls.
  2. A long name ends in an ellipsis and the row's end stays where it was.
  3. Rows close, groups apart. A group's heading stays in view while its rows pass.
  4. A row's act answers on the row: busy, then done, or failed with the way to try again.
  5. The markup says what it is: a list is a list, a table a <table> with a caption and header cells.
  6. Numbers stand at the trailing edge, in digits of one width, with the same number of decimals and the unit in the header.
  7. Words stay whole. One column gives way; a date and a number are one piece.
  8. A table never widens the page and is never squeezed. On a phone it drops columns or scrolls in its region.
  9. The header stays in view, and it sticks to whatever scrolls.
  10. A region that scrolls has a name and takes focus; its held column has a ground of its own, a line at its edge and at most half the room.
  11. Sorting is on the header, one column at a time, and says which way.
  12. A row's two ends stay in one glance: a list and a table have a widest width.
  13. "Select all" has three states, and the bar says how many are chosen.
  14. Pages fit a phone, and a step that can't be taken keeps the focus.
  15. A long set comes back as it was: the page, the rows loaded, the position.
  16. Empty is not no results. Each state has its own words.
  17. Loading has the rows' geometry; nothing moves when they arrive.
  18. Targets the size of a finger around a checkbox; a hover only where a pointer can hover.

5. Check it running

  • Widths: 320, 375, 760 (the compact form in a wide window), 1024, 1440. At each the page doesn't scroll sideways: document.documentElement.scrollWidth is no more than the window's width.
  • Content: a name of 200 characters, a word of 50 letters, a number of nine digits, one row, no rows, a thousand rows.
  • Every state, by forcing it: a slow request, a failed one, a filter that matches nothing.
  • Scrolling: the header stays; in a region the first column stays too; a group's heading gives way to the next.
  • Keyboard only: Tab through a row (its link, then its controls), scroll a region with the arrow keys, sort with Enter, and see where focus is after Next on the last page. Tab to a row that lies behind a header, a heading or a bar that stays: it comes out from under it.
  • A coarse pointer: every checkbox and step is a target of 44 pixels.
  • Light and dark.
  • What a desktop browser can't show: what a screen reader says for the list and the table, a region scrolled by touch, the zoom of iOS into a search field. Check them on a device, or say that they are unchecked.

6. Report

  1. List, table or grid, and what decided it.
  2. What a row opens, its one act, and whether rows can be chosen.
  3. The order it opens in, what sorts and narrows it, and how a long set is shown.
  4. For a table: what it does on a phone, and why.
  5. The traps that failed and what was fixed.
  6. What is unchecked, and what only the user can decide.
references/traps.md Show

The traps in a list and a table

The eighteen checks of SKILL.md, each with what you see when it's wrong, why it happens, the fix and where the rule comes from. "Measured" is what the base did in Chromium on 27 November 2026; no other browser was measured. Read the entry of a check that failed, or all of them before building a table.

1. One link per row
  • You see: a row that opens when clicked, but can't be opened in a new tab and shows no address. Or a click on the row's checkbox opens the row. Or the keyboard stops twice on a row, on two things that do the same.
  • Why: a click handler on the row (<tr onclick>, <li onclick>), or one link wrapped around the whole row with a checkbox or a button inside it.
  • Fix: one <a href>, on the row's name. In a list its ::after covers the row (.set-row .set-title::after), so the whole row is the target and it is still one link, one stop of the Tab key and one name for a screen reader. The row's other controls are raised above it. The focus ring goes around the row. In a table the link fills the name's cell and the row is not a target: a cover over a <tr> needs position: relative on the row, which Safari honours only since version 27.
  • The price: text under the cover can't be selected with the pointer, and a raised control leaves a hole in the target. A row whose text people copy keeps the link on the name alone.
  • Measured: a point on the note or on the fact at the row's end hits the link; the centre of the tick hits the checkbox; "Try again" hits its button.
  • Source: HTML Standard, the a element: no interactive content inside it, and a button and a label are interactive content. Heydon Pickering, "Cards", Inclusive Components (2018): the cover and its price. Adrian Roselli, "Block Links, Cards, Clickable Regions, Rows, Etc." (2020): the same, and a table row that is clickable as a whole as a pattern to avoid. Safari 27 release notes (September 2026): position: relative on a table row.
2. A long name ends in an ellipsis
  • You see: with a long title the time at the row's end is pushed off the screen, or the row grows to four lines and the list can't be scanned.
  • Why: a flex child never shrinks below its text.
  • Fix: min-width: 0 on the part that holds the name, and the name on one line with an ellipsis. The fact at the row's end is short; if it isn't, it gets at most 45% of the row and an ellipsis of its own. When names share a long beginning, the ellipsis hides what tells them apart: give the name two lines (-webkit-line-clamp: 2 with display: -webkit-box and -webkit-box-orient: vertical; no browser ships the unprefixed property). Text that needs more belongs on the thing's page.
  • Measured: a name of 200 characters at 320 wide leaves the row at its height of 61px, with its end where it was.
  • Source: Material 3, "Lists": a label of one line that may wrap or be cut, supporting text of one to three lines. Apple Human Interface Guidelines, "Lists and tables": keep a row's text short, and move long text to a detail view. MDN, line-clamp.
3. Rows close, groups apart
  • You see: a group's heading sits as near to the rows above it as to its own, so the groups can't be told apart. Or the heading scrolls away and nobody knows which group the rows on screen belong to. Or a checkbox passes over a heading that stays, or a row takes the keyboard's focus while it is behind that heading.
  • Fix: the space above a group is more than twice the space between two rows. Rows that have room need no lines between them. Each group is a <section> with its heading; the heading sticks under the frame's bar (top: var(--shell-cover-top)) for as long as its own rows are there, has a ground of its own, and lies above the rows' raised controls (z-index: 2). What can take focus in a row has scroll-margin-top of the heading's height.
  • Measured: a link 20px below the bar, behind the heading, stayed hidden when it took focus; with the margin the page scrolls it to 20px below the heading.
  • Source: the Gestalt law of proximity. Richard Rutter, "Web Typography: Designing Tables to be Read, Not Looked At" (A List Apart, 2017): as few lines as possible, and light. WCAG 2.2, 2.4.11 Focus Not Obscured (Minimum), level AA: headers that stay are its usual cause.
4. A row's act answers on the row
  • You see: a tick on one row puts a spinner over the whole list. A change that failed shows as a banner at the top of the page, far from the row. Every delete asks "Are you sure?". A done task is crossed out and can't be read any more. An act exists only as a swipe.
  • Fix: the act happens at once. While its change is on the way the row is aria-busy and quieter, and the rest of the list stays usable. If it fails, the row says so where its note was, with the way to try again. What can be undone offers Undo instead of asking first. Done is quieter, never crossed out. A swipe only repeats what a control on the row or on the thing's page already does. More than one or two acts don't fit a row: the rest is on the thing's page.
  • Source: Page Laubheimer, "Data Tables: Four Major User Tasks" (Nielsen Norman Group, 2022): acts on the row work for one or two, and acts hidden behind a hover or a general menu are hard to find. Angie Li, "Using Swipe to Trigger Contextual Actions" (Nielsen Norman Group, 2017): a swipe shows no sign of itself; confirm or offer Undo for what destroys. WCAG 2.2, 2.5.1 Pointer Gestures (level A) and 2.5.7 Dragging Movements (level AA): a gesture along a path, and a drag, each need a way with a single press. Material 3, "Lists": a swipe has another way beside it.
5. The markup says what it is
  • You see: a screen reader reads a table as a run of words, with no column named for any cell. Or it doesn't say that a list is a list, nor how many things it holds.
  • Why: divs arranged like a table. Or a list whose bullets were styled away: Safari then stops calling it a list, on purpose, unless it stands in a <nav>.
  • Fix: a <table> with a <caption> (hidden with set-hide where the bar already shows it), <th scope="col"> for each column and <th scope="row"> for the cell that names the row. A column for checkboxes has a plain <td> in the header row, not an empty <th>. A list is a <ul> with role="list".
  • Restacking a table by display (rows as block or grid, to make cards on a phone) used to take the table's meaning away: in Safari until version 17, in Firefox until 113. Current browsers keep it, and have broken it again more than once. The base never does it.
  • Source: W3C WAI, "Tables Tutorial": a caption, and scope on header cells, for WCAG 1.3.1 Info and Relationships (level A). Scott O'Hara, "'Fixing' Lists" (2019, updated 2023), and WebKit bug 170179, where James Craig calls the behaviour deliberate; still so in February 2026. Adrian Roselli, "Tables, CSS Display Properties, and ARIA" (2018) and "It's Mid-2022 and Browsers (Mostly Safari) Still Break Accessibility via Display Properties" (2022, with notes to 2026).
6. Numbers stand at the trailing edge
  • You see: 1,240.00 and 86.50 start at the same edge, so their decimal points don't stand under each other and no one can see which is larger. Or the digits have different widths and the column flickers from row to row.
  • Fix: set-num on the cell and on its header: text-align: end, never wrapping. On the table font-variant-numeric: tabular-nums. The same number of decimals in every row of a column. The unit once, in the header ("Amount, €"), not in every cell. Text stays at the leading edge, with its header. A number nobody adds up or compares is text: a phone number, a postcode, an invoice's number. Dates in one format, so they line up as text.
  • Source: GOV.UK Design System, "Table": numbers that are compared are aligned right. U.S. Web Design System, "Table": numerical data right, in digits of one width; not phone numbers, postcodes or dates. Richard Rutter (2017): text left, numbers right, a heading with its data, tabular lining figures. Material 2, "Data tables" (no longer maintained; Material 3 has no page for tables). font-variant-numeric is Baseline, widely available.
7. Words stay whole
  • You see: "Overdu" and "e" on two lines in a status column, while the column beside it has room to spare. A date broken after its month.
  • Why: the frame lets a long word break anywhere, so that nothing widens the page. With overflow-wrap: anywhere those breaks count toward the smallest width a column can have, so in a table every column's smallest width is a single letter. A browser that has to take width away then takes a little from each column.
  • Fix: a cell wraps between words only (overflow-wrap: break-word, whose breaks don't count toward that width). A date and a number are one piece (white-space: nowrap). One column gives way to the others (set-text, overflow-wrap: anywhere): the one that may hold a long piece without a space, such as a name, an address or a file's name.
  • Measured: seven columns in 767px. Before: "Overdue" cut in two, every date on two lines. After: every row on one line, but the one with the longest customer. With a word of 48 letters in the column that gives way, the page stays 320 wide; without that column marked, the same word made the page 618 wide.
  • Source: MDN, overflow-wrap: the difference between anywhere and break-word.
8. A table never widens the page and is never squeezed
  • You see: on a phone the whole page scrolls sideways. Or the table seems to fit, and every word in it is broken.

  • Why: the desktop's columns were kept. Four short columns and a checkbox need about 390px; a phone has 320 to 375.

  • Fix: decide per table what it is for.

    • To compare across columns: every column stays, and the table's region scrolls (traps 9 and 10). This is the answer the sources give.
    • To find a row and open it: mark the columns a phone has no room for (set-minor). What must still be seen moves to a line under the name (set-under), which shows only where the columns are dropped. This one is the base's own answer, and its reason is the measurement above: such a table is read like a list on a phone, and a list's row is a name, a line under it and one fact. Everything dropped is on the row's page.

    Both answer to the room the set has, not to the window. The base drops columns below 45rem of room, a number for about seven columns: raise it for a table with more, until no row takes three lines.

  • Measured: 320, 375, 760 and 900 wide: four columns, words whole, the page as wide as the window. 1024: seven columns, one row of two lines.

  • Source: Amy Schade, "Mobile Tables: Comparisons and Other Data Tables" (Nielsen Norman Group, 2017): hold the column that names the rows, hold the header, let cut-off content show that there is more, let people choose which columns they see. WCAG 2.2, 1.4.10 Reflow (level AA): a data table may scroll both ways; its cells and what stands around it may not. Richard Rutter (2017): on a small screen a table that scrolls and can be read, or a simple table as a list.

9. The header stays in view
  • You see: position: sticky on the header does nothing. Or the header sticks, but under the app's bar, where it can't be seen. Or it sticks and its line is gone, or the rows show through it. Or a row takes the keyboard's focus while it is behind the header.
  • Why: something sticky sticks to the nearest ancestor that can scroll, even when that one isn't what scrolls. A wrapper with overflow-x: auto is such an ancestor, and its overflow-y becomes auto with it; since it never scrolls down, the header never sticks. A line of a table with collapsed borders belongs to the table, not to the cell that moves.
  • Fix: in a page, no wrapper around the table, and top: var(--shell-cover-top): the height of the frame's bar. A table that has to scroll sideways and hold its header stands in a workspace: its region scrolls both ways and the header sticks to the region's top (the token is 0 inside it). Sticky on the header's cells, a ground on each, border-collapse: separate. What can take focus in a row has scroll-margin-top of the header's height.
  • Measured: a page scrolled by 204px: the header's cells at 56px, the bar's lower edge. The same table inside a div with overflow-x: auto: the header at -47px, scrolled away. With border-collapse: collapse the stuck header had no line under it. A region scrolled by 300 and 200: the header at the region's top, its corner above both.
  • Source: MDN, position, the value sticky. CSS Overflow Module Level 3, section 3.1: visible computes to auto when the other direction scrolls. CSS Working Group, issue 3136, "Collapsed table borders don't follow sticky rows/cells when they stick": open since 2018, and browsers differ. Chrome for Developers, "TablesNG": <thead> and rows stick only since Chromium 91, header cells since 56. WCAG 2.2, 2.4.11 Focus Not Obscured (Minimum), level AA.
10. A region that scrolls has a name and takes focus
  • You see: with a keyboard the table can't be scrolled sideways. Or the column that names the rows scrolls away, and the numbers that remain belong to nothing. Or that column is held, but the others show through it. Or a long name makes it as wide as the phone.
  • Why: Chrome (since 132) and, by Adrian Roselli's account, Firefox let the keyboard into a region that scrolls and holds nothing else to focus. Safari doesn't.
  • Fix: on the region tabindex="0", and with it role="region" and aria-labelledby naming the table's caption, so that what takes focus says what it is. The column that names the rows is set-hold: sticky at the leading edge, with a ground of its own, a line at its edge, and at most 45% of the region or 16rem. The corner cell lies above the header's row and the held column. overscroll-behavior-x: contain, so a scroll that reaches the end doesn't go on as the browser's Back. The table itself is width: max-content: it may scroll, so it is as wide as its columns need.
  • Measured: the arrow keys scroll the focused region both ways. A name of 200 characters in the held column wraps at 169px of 375. The cap is a max-width on a table cell, which Chromium honours; Firefox and Safari are unchecked.
  • Source: Adrian Roselli, "Under-Engineered Responsive Tables" (2020, updated October 2026): the three attributes; his update says the role may no longer be required. axe-core, rule scrollable-region-focusable, for WCAG 2.1.1 Keyboard (level A). Chrome 132 release notes (January 2025), "Keyboard focusable scroll containers". WebKit bug 277290, open in November
    1. Amy Schade (2017): hold the column that names the rows.
11. Sorting is on the header
  • You see: nothing says which column the rows are sorted by, or every header carries an arrow. A header reacts to a click but not to the keyboard. On a phone the column the rows are sorted by is one of those that were dropped.
  • Fix: a control inside the header cell (set-sort): a link where the order is in the address, a button where a script sorts in place. aria-sort="ascending" or "descending" on the <th> of the one column the set is sorted by, and on no other. Only that column shows its arrow; the others show a fainter one under the pointer or the focus. The caption says which headers sort. The first click gives the order wanted most, the second reverses it. A new order starts at the first page. The column the set opens sorted by is not one that a phone drops; otherwise the order stands in words beside the count.
  • Source: WAI-ARIA 1.2, aria-sort: on a column's or a row's header, on one header of a table at a time. ARIA Authoring Practices Guide, "Sortable Table Example": a button inside the header cell, aria-sort on the sorted column only, and a caption that says the headers with buttons sort.
12. A row's two ends stay in one glance
  • You see: on a wide screen a name at the left edge and its amount 1,400px to the right, with nothing between them to follow.
  • Fix: a list is at most 48rem wide (--set-list-width), a table 80rem (--set-table-width). A table in a region is as wide as its columns need, never stretched.
  • Source: Richard Rutter (2017): a table is as wide as its content, not as its page.
13. "Select all" has three states
  • You see: the box for all rows is checked although one row was unticked. Nothing says how many rows are chosen. A part that was given the hidden attribute shows anyway. A click with Shift selects the text between two rows.
  • Why: "some" is a third state, and it exists only as a property a script sets. And a display from the author's stylesheet beats hidden.
  • Fix: select.js sets checked and indeterminate on the box for all, and writes the count into an <output>. The bar of acts appears with the first row chosen, at the lower edge and above the frame's own bar (bottom: var(--shell-cover-bottom)); Clear is the form's reset. "All" means all rows on this page: where the set has more, the bar offers the rest in words ("Select all 240"). .set [hidden] { display: none !important; }, and user-select: none on the checkbox's label.
  • On a phone Apple's lists show the boxes only after "Edit" or "Select"; Material's show them in the row. The base shows them always. Where choosing is rare, put the column behind such a control, never behind a long press alone.
  • Measured: one row chosen: the box mixed, "1 selected". A real click with Shift on the edge of a label five rows on: "6 selected", and no text selected. All: checked, "10 selected". Clear: none, and the bar gone. Without the script the rows' boxes, the bar and Clear work, and the box for all and the count stay hidden.
  • Source: HTML Standard, the checkbox state: indeterminate is a property with no attribute. Page Laubheimer (2022): for acts on several records, a checkbox per record, one for all, and the controls above or below the table. Apple Human Interface Guidelines, "Lists and tables": on iOS an edit mode comes before choosing. Material 3, "Lists". :has() is Baseline, widely available since June 2026.
14. Pages fit a phone, and a step keeps the focus
  • You see: the row of page numbers is wider than the phone and the page scrolls sideways. Or on the last page the keyboard's focus is gone after Next, and Tab starts again from the top.
  • Why: a control that sets disabled on itself can't keep the focus that was on it. The browser then gives the focus to the page as a whole.
  • Fix: with little room, Previous, "Page 2 of 7" and Next; the numbers from 34rem of room. A step that can't be taken is aria-disabled="true", which says so and leaves it in the keyboard's reach. The whole is a <nav> with a name, the pages are a list, the current page's link carries aria-current="page", and the page is in the address.
  • Measured: the step without a page to go to takes focus. Under a coarse pointer both steps are 44px tall.
  • Source: HTML Standard, "Processing model" of the event loop: when what has focus can no longer take it, the focus moves to the viewport; a control that becomes disabled is its example. MDN, aria-disabled: it changes what is said, not what can be focused. U.S. Web Design System, "Pagination": a <nav> with a name, a list, aria-current="page". GOV.UK Design System, "Pagination": the same in its code.
15. A long set comes back as it was
  • You see: after a look at one row and Back, the list is at its top, or on its first page. Or the footer can never be reached, because more rows arrive whenever it comes near. Or the browser's find doesn't find a row, because only the rows on screen exist.
  • Fix: the page number in the address. With "Load more", the number of rows loaded is kept with the history entry and restored before the scroll position is (app-navigation, trap 3); the button is a button, and focus moves to the first new row. Rows load by themselves only in a feed that nobody looks things up in, and never above a footer. Before rendering only the rows on screen, try content-visibility: auto with contain-intrinsic-size on the rows: they stay in the page for the browser's find, for the Tab key and for a screen reader. A browser that doesn't know the property (Safari before 26) renders every row, as before.
  • Source: Tim Neusesser, "Infinite Scrolling: When to Use It, When to Avoid It" (Nielsen Norman Group, 2022): for alike things looked through without a goal; not for finding one thing, comparing, or where a footer has to be reached. Hoa Loranger, "Infinite Scrolling Is Not for Every Website" (Nielsen Norman Group, 2014). Christian Holst, "Infinite Scrolling, Pagination Or 'Load More' Buttons? Usability Findings In eCommerce" (Smashing Magazine, 2016): in shops "Load more" did best for product lists and search results, with the place restored after Back; the Baymard Institute's findings of 2024 call pages workable too. GOV.UK Design System, "Pagination": no endless scroll, for the keyboard's sake. MDN, content-visibility.
16. Empty is not no results
  • You see: a filter that matches nothing shows "No tasks yet. Add your first task", although there are eight. Or the place where the rows would be is blank. Or "No tasks yet" shows for a moment while the tasks are still loading.

  • Fix: one screen per state, each with its own words, in the place of the rows:

    State Says Offers
    Empty what will appear here the way to add the first
    No results what was asked for the way to take the filter or the search off
    Failed what to do the control that tries again
    No access that this set isn't this person's to see who can change that

    The tools stay above a state, so a filter can be changed where it was set. With a filter on, the count says "0 of 8"; it is a role="status", so a change is read out. A failed set is role="alert". Loading is never shown as empty.

  • Source: Kate Kaplan, "Designing Empty States in Complex Applications: 3 Guidelines" (Nielsen Norman Group, 2021): an empty state says what the system is doing, teaches, and leads to the first task; no "no records" while content still loads. Apple, SwiftUI ContentUnavailableView: a view of its own for a search without results, beside the one for a list without items. WCAG 2.2, 4.1.3 Status Messages (level AA): the number of results after a search is its example. WAI-ARIA 1.2, the role status.

17. Loading has the rows' geometry
  • You see: a spinner in the middle of the page, then rows that arrive and move everything. Or grey bars of another height than the rows that replace them. Or the bars flash for a tenth of a second.
  • Fix: the row's own parts with a bar inside each (set-bone), so every line keeps its height. The bars are hidden from assistive tech (aria-hidden), one line with role="status" says what is loading, and the set is aria-busy. The bars move only for people who haven't asked for less motion. The tools above stay usable. A wait under a second shows nothing; one over ten seconds shows how far it is.
  • Measured: loading.html beside index.html: every row 61px, the groups and the first row at the same heights.
  • Source: Samhita Tankala, "Skeleton Screens 101" (Nielsen Norman Group, 2023): nothing for less than a second, a skeleton for a whole page that takes under ten, a spinner for a single part, a bar that shows progress beyond ten. WAI-ARIA 1.2, aria-busy.
18. Targets the size of a finger
  • You see: a checkbox of 18px that a finger misses, and the miss opens the row. On a phone the ground of a hover stays on the last row touched.
  • Fix: the checkbox stands in a <label> as large as --shell-hit (36px under a mouse, 44px under a finger), pulled outward by a negative margin so that the box, not its target, sits on the content's edge. Every hover stands in @media (hover: hover).
  • Measured: under a coarse pointer the row's checkbox, the box for all, Previous, Next and the row's link in a table are each 44px tall.
  • Source: WCAG 2.2, 2.5.8 Target Size (Minimum), level AA: 24 by 24 CSS pixels at the least. Apple Human Interface Guidelines, "Buttons": a hit region of at least 44 by 44 points. Material 3, "Accessibility": touch targets of at least 48 by 48dp.
assets/app-navigation.css Show
/* Generated from the skill app-navigation (assets/app-navigation.css) by `pnpm sync`. Edit the source, never this copy. */

/*
 * app-navigation.css: the way between an app's screens. It stands on app-shell.css, which is
 * beside it; load that first.
 *
 * Copy this file. Keep every line marked TRAP.
 *
 * Back, first in a bar, before the title. A link to the parent, never only a script:
 *
 *   <header class="shell-bar">
 *     <a class="shell-back" href="/settings" aria-label="Back to Settings"><svg/><span>Settings</span></a>
 *     <h1 class="shell-title">Notifications</h1>
 *
 * A list beside the thing chosen from it. On the shell: data-shell="split".
 *
 *   <main class="shell-content" id="content" tabindex="-1">
 *     <div class="shell-split" data-open>                  data-open: something is chosen
 *       <section class="shell-pane" data-pane="list">      each pane: its bar, then the part that scrolls
 *         <header class="shell-bar"> <h2 class="shell-title">Inbox</h2>
 *         <ul class="shell-scroll"> <li><a href="/inbox/2" aria-current="page">
 *       <article class="shell-pane" data-pane="detail">
 *         <header class="shell-bar"> <a class="shell-back" href="/inbox"> <h1 class="shell-title">
 *         <div class="shell-scroll">
 *
 * Working examples: index.html (a list and its messages), settings.html (a pushed page).
 */

:root {
	--shell-list-width: clamp(16rem, 38%, 24rem); /* the list's column when both panes show */
}

/* ---- Back ---- */

/* Compact: a key with the chevron. Where it leads is its name for assistive tech (aria-label). */
.shell-back {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: var(--shell-hit);
	min-height: var(--shell-hit);
	/* the chevron, not its hit area, sits on the content's edge */
	margin-inline-start: calc((var(--shell-hit) - 1.25rem) / -2);
	border-radius: 0.5rem;
	color: inherit;
	text-decoration: none;
}

.shell-back svg {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
}

.shell-back span {
	display: none;
}

/* In a right-to-left page Back points the other way. */
[dir='rtl'] .shell-back svg {
	transform: scaleX(-1);
}

@media (hover: hover) {
	.shell-back:hover {
		background: var(--shell-current);
	}
}

/* Regular: Back says where it goes, in words, before the title. */
@media (min-width: 37.5em) {
	.shell-back {
		gap: 0.125rem;
		justify-content: flex-start;
		/* the chevron stays on the content's edge; the ground under the pointer reaches past it */
		margin-inline-start: -0.375rem;
		padding-inline: 0.375rem 0.5rem;
		color: var(--shell-muted);
		font-size: 0.9375rem;
	}

	.shell-back span {
		display: inline;
	}
}

/* ---- A list beside the thing chosen from it ---- */

/* The panes answer to the room the content has, not to the window: beside a sidebar the window
   is wide long before the content is. */
.shell-content:has(> .shell-split) {
	container: shell-content / inline-size;
}

.shell-split {
	display: grid;
	flex: 1;
	grid-template-columns: minmax(0, 1fr);
	min-height: 0;
}

.shell-pane {
	display: flex;
	flex-direction: column;
	/* TRAP: both, or a pane grows with what is in it and the other pane or the page scrolls */
	min-width: 0;
	min-height: 0;
}

/* TRAP: one pane at a time. With something chosen the list gives way to it; with nothing chosen
   there is only the list. Never both squeezed into a phone's width. */
.shell-split[data-open] > [data-pane='list'],
.shell-split:not([data-open]) > [data-pane='detail'] {
	display: none;
}

/* The row that is open, for when the list shows beside it. */
.shell-split [data-pane='list'] a[aria-current='page'] {
	background: var(--shell-current);
}

/* What the detail's pane says while nothing is chosen. */
.shell-empty {
	display: grid;
	flex: 1;
	place-items: center;
	margin: 0;
	padding: var(--shell-gutter);
	color: var(--shell-muted);
	text-align: center;
}

/* Both panes from 40rem of content: a list of 16rem and 24rem left to read in. (A custom property
   can't stand in a container query, so the number is here.) */
@container shell-content (min-width: 40rem) {
	.shell-split {
		grid-template-columns: var(--shell-list-width) minmax(0, 1fr);
	}

	/* both panes, whatever is chosen */
	.shell-split[data-open] > [data-pane='list'],
	.shell-split:not([data-open]) > [data-pane='detail'] {
		display: flex;
	}

	.shell-split > [data-pane='list'] {
		border-inline-end: 1px solid var(--shell-line);
	}

	/* TRAP: no Back where the list is in view. It would only do what a click on the list does. */
	.shell-split .shell-back {
		display: none;
	}
}
assets/app-shell.css Show
/* Generated from the skill app-shell (assets/app-shell.css) by `pnpm sync`. Edit the source, never this copy. */

/*
 * app-shell.css: the frame of an app. Places to go, a bar with the title, the content.
 *
 * Copy this file. Map the tokens to the project's own. Keep every line marked TRAP: each one
 * prevents a fault that shows only at some width, some length of content or on some device.
 *
 *   <a class="shell-skip" href="#content">Skip to content</a>
 *   <div class="shell" data-shell="page">            page: the document scrolls
 *     <nav class="shell-nav" aria-label="Main">      workspace: the window is fixed, a part scrolls
 *                                                    split: a workspace from 600px, a page below
 *       <ul class="shell-places"> <li><a href aria-current="page"><svg/><span>Name</span></a>
 *     <header class="shell-bar"> <h1 class="shell-title"> <button class="shell-action">
 *     <main class="shell-content" id="content" tabindex="-1">
 *
 * Two size classes, by the window's width: compact below 600px (the places are a row at the
 * bottom), regular from 600px (the places are a column on the side). Working examples: page.html,
 * workspace.html. The page needs
 *   <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
 */

:root {
	color-scheme: light dark;

	/* Tokens. These follow the system's light and dark; replace them with the project's. */
	--shell-surface: Canvas;
	--shell-recess: color-mix(in srgb, CanvasText 5%, Canvas); /* the sidebar's ground */
	--shell-text: CanvasText;
	--shell-muted: color-mix(in srgb, CanvasText 62%, Canvas);
	--shell-line: color-mix(in srgb, CanvasText 14%, Canvas);
	--shell-current: color-mix(in srgb, CanvasText 10%, Canvas); /* behind the place you are in */
	--shell-focus: Highlight;

	--shell-gutter: 1rem; /* the content's side margin; the bar's too, so the title sits on the content's edge */
	--shell-nav-width: clamp(12rem, 24vw, 16rem);
	--shell-bar-height: 3.5rem;
	--shell-tabs-height: 3.5rem;
	--shell-hit: 2.25rem; /* a row or a button under a mouse: 36px */
	--shell-layer: 10; /* the bars, above the content; overlays go above this */

	/* How far the frame's bars reach over whatever scrolls. Something sticky inside the content (a
	   table's header, a bar of actions) stops there instead of sliding under them:
	   `top: var(--shell-cover-top)`, `bottom: var(--shell-cover-bottom)`. */
	--shell-cover-top: calc(var(--shell-bar-height) + env(safe-area-inset-top, 0px));
	--shell-cover-bottom: calc(var(--shell-tabs-height) + env(safe-area-inset-bottom, 0px));
}

/* TRAP: density follows the pointer, not the width. A touch tablet is wide and still needs 44px;
   a narrow desktop window does not. */
@media (pointer: coarse) {
	:root {
		--shell-hit: 2.75rem;
	}
}

html {
	/* TRAP: a jump to #anchor, or focus moving by Tab, lands under the sticky bar without this. */
	scroll-padding-top: calc(var(--shell-bar-height) + env(safe-area-inset-top, 0px) + 1rem);
	/* TRAP: and under the row of places at the bottom. To the browser a link behind that row is
	   in view, so it doesn't scroll it out from under it. */
	scroll-padding-bottom: var(--shell-cover-bottom);
	/* TRAP: without a reserved gutter the frame shifts sideways between a short page and a long one. */
	scrollbar-gutter: stable;
}

body {
	margin: 0;
}

.shell,
.shell *,
.shell-skip {
	box-sizing: border-box;
}

.shell {
	display: grid;
	/* TRAP: `1fr` means minmax(auto, 1fr): one wide child (a table, a long word) widens the whole
	   page. minmax(0, 1fr) lets the column stay as wide as the window. */
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto minmax(0, 1fr) auto; /* bar, content, places */
	/* TRAP: 100vh is taller than a phone's screen while the browser's bars show, so the last row
	   ends up under them. svh is the screen with the bars showing. */
	min-height: 100vh;
	min-height: 100svh;
	padding-left: env(safe-area-inset-left, 0px);
	padding-right: env(safe-area-inset-right, 0px);
	background: var(--shell-surface);
	color: var(--shell-text);
	font: 1rem/1.5 system-ui, sans-serif;
	-webkit-tap-highlight-color: transparent;
}

.shell :focus-visible,
.shell-skip:focus-visible {
	outline: 2px solid var(--shell-focus);
	outline-offset: 2px;
}

/* The first stop of the Tab key: over the places, into the content. Hidden until it has focus. */
.shell-skip {
	position: absolute;
	top: 0.5rem;
	inset-inline-start: 0.5rem;
	z-index: calc(var(--shell-layer) + 1);
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background: var(--shell-surface);
	color: var(--shell-text);
	transform: translateY(-200%);
}

.shell-skip:focus {
	transform: none;
}

/* ---- The bar: the title once, the page's own actions at its end ---- */

.shell-bar {
	grid-row: 1;
	position: sticky;
	top: 0;
	z-index: var(--shell-layer);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: calc(var(--shell-bar-height) + env(safe-area-inset-top, 0px));
	padding: env(safe-area-inset-top, 0px) var(--shell-gutter) 0;
	border-bottom: 1px solid var(--shell-line);
	background: var(--shell-surface);
}

.shell-title {
	flex: 1;
	/* TRAP: a flex child never shrinks below its text. Without this a long title pushes the actions
	   off the screen instead of ending in an ellipsis. */
	min-width: 0;
	margin: 0;
	overflow: hidden;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shell-action {
	display: grid;
	flex: none;
	place-items: center;
	min-width: var(--shell-hit);
	min-height: var(--shell-hit);
	padding: 0;
	border: 0;
	border-radius: 0.5rem;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

/* The glyph, not its hit area, sits on the content's edge. */
.shell-action:last-child {
	margin-inline-end: calc((var(--shell-hit) - 1.25rem) / -2);
}

.shell-action svg {
	width: 1.25rem;
	height: 1.25rem;
}

/* ---- The content ---- */

.shell-content {
	grid-row: 2;
	/* TRAP: the same as the title's. A grid child never shrinks below its content either. */
	min-width: 0;
	overflow-wrap: anywhere; /* a long word or address wraps instead of widening the page */
}

/* It takes focus when the skip link or a navigation sends it there; that needs no ring. */
.shell-content:focus {
	outline: none;
}

/* A reading column inside the content: text and forms. Tables and canvases go without it. */
.shell-page {
	max-width: 48rem;
	padding: 1rem var(--shell-gutter) 3rem;
}

/* ---- The places: compact, a row at the bottom ---- */

.shell-nav {
	grid-row: 3;
	/* Sticky, in a row of its own: it stays at the screen's lower edge and still takes its space,
	   so the content's last line is never under it. (A fixed bar needs padding to make up for it.) */
	position: sticky;
	bottom: 0;
	z-index: var(--shell-layer);
	padding-bottom: env(safe-area-inset-bottom, 0px); /* clear of the home indicator */
	border-top: 1px solid var(--shell-line);
	background: var(--shell-surface);
}

.shell-places {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shell-places li {
	flex: 1;
	min-width: 0;
}

.shell-places a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.125rem;
	min-height: var(--shell-tabs-height);
	padding-inline: 0.25rem;
	color: var(--shell-muted);
	font-size: 0.6875rem;
	line-height: 1.2;
	text-decoration: none;
	outline-offset: -2px;
}

.shell-places span {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The glyph in a pill: where you are shows at a glance, not as a slightly darker grey.
   aria-current is "page" on the place's own page and "true" on a page inside it. */
.shell-places svg {
	box-sizing: content-box;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0.125rem 1rem;
	border-radius: 999px;
}

.shell-places a:is([aria-current='page'], [aria-current='true']) {
	color: var(--shell-text);
	font-weight: 600;
}

.shell-places a:is([aria-current='page'], [aria-current='true']) svg {
	background: var(--shell-current);
}

/* TRAP: on a touch screen :hover sticks to the last thing tapped. Only a pointer that can hover gets it. */
@media (hover: hover) {
	.shell-places a:hover {
		color: var(--shell-text);
	}

	.shell-action:hover {
		background: var(--shell-current);
	}
}

/* ---- Regular: from 600px the places are a column on the side ---- */

/* In em, so a larger text size in the browser moves to the compact frame sooner. */
@media (min-width: 37.5em) {
	:root {
		--shell-gutter: 2rem;
		--shell-cover-bottom: 0px; /* the places are beside the content now, not under it */
	}

	.shell {
		grid-template-columns: var(--shell-nav-width) minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
	}

	.shell-bar {
		grid-area: 1 / 2;
	}

	.shell-content {
		grid-area: 2 / 2;
	}

	.shell-nav {
		grid-area: 1 / 1 / -1 / 2;
		/* TRAP: without a height of its own and `sticky`, the sidebar scrolls away with a long page.
		   svh, not dvh: a column that follows the browser's bars resizes while you scroll. */
		top: 0;
		bottom: auto;
		align-self: start;
		height: 100vh;
		height: 100svh;
		overflow-y: auto;
		overscroll-behavior-y: contain; /* its own scroll ends there and doesn't move the page */
		/* the first row sits on the bar's line */
		padding: calc((var(--shell-bar-height) - var(--shell-hit)) / 2) 0.5rem 0.5rem;
		border-top: 0;
		background: var(--shell-recess);
	}

	.shell-places {
		flex-direction: column;
		gap: 0.125rem;
	}

	.shell-places a {
		flex-direction: row;
		justify-content: flex-start;
		gap: 0.75rem;
		min-height: var(--shell-hit);
		padding-inline: 0.75rem;
		border-radius: 0.5rem;
		font-size: 0.9375rem;
	}

	.shell-places svg {
		flex: none;
		width: 1.25rem;
		height: 1.25rem;
		padding: 0;
		border-radius: 0;
	}

	.shell-places a:is([aria-current='page'], [aria-current='true']),
	.shell-places a:is([aria-current='page'], [aria-current='true']) svg {
		background: none;
	}

	.shell-places a:is([aria-current='page'], [aria-current='true']) {
		background: var(--shell-current);
	}

	@media (hover: hover) {
		.shell-places a:hover {
			background: var(--shell-current);
		}
	}
}

/* ---- Workspace: the window is fixed and a part of the content scrolls ---- */

/* Nothing of the document scrolls, so it needs no gutter and should not bounce at its edges.
   (Safari ignores overscroll-behavior on a scroller that has nothing to scroll.) */
html:has(.shell[data-shell='workspace']) {
	overflow: hidden;
	scrollbar-gutter: auto;
	overscroll-behavior: none;
}

.shell[data-shell='workspace'] {
	/* dvh here: the frame is the window, and follows it when the browser's bars or, where the
	   browser resizes the page for it, the keyboard change its height. */
	height: 100vh;
	height: 100dvh;
	min-height: 0;
}

.shell[data-shell='workspace'] .shell-content {
	display: flex;
	flex-direction: column;
	/* TRAP: without min-height: 0 the content grows as tall as what is in it, and the page scrolls
	   instead of the part that should. */
	min-height: 0;
}

/* The part that scrolls. Everything beside it in the content (a composer, a toolbar) stays.
   Only inside a fixed window: in a page it must not be a scroller, or sticky parts inside it
   stop sticking. */
.shell[data-shell='workspace'] .shell-scroll {
	flex: 1;
	min-height: 0; /* TRAP: as above, for a flex child */
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
	/* the bars are outside this scroller, so nothing covers its edges */
	--shell-cover-top: 0px;
	--shell-cover-bottom: 0px;
}

.shell[data-shell='workspace'] .shell-nav {
	position: static;
}

@media (min-width: 37.5em) {
	.shell[data-shell='workspace'] .shell-nav {
		align-self: stretch;
		height: auto;
		min-height: 0;
	}
}

/* ---- Split: two panes side by side that are one pane on a phone ---- */

/* The kind of scrolling follows the number of panes. From 600px the frame is a workspace, the
   same rules as above, so each pane can scroll on its own. Below, one pane shows at a time and
   the frame is a page. The panes themselves are app-navigation's. */
@media (min-width: 37.5em) {
	html:has(.shell[data-shell='split']) {
		overflow: hidden;
		scrollbar-gutter: auto;
		overscroll-behavior: none;
	}

	.shell[data-shell='split'] {
		height: 100vh;
		height: 100dvh;
		min-height: 0;
	}

	.shell[data-shell='split'] .shell-content {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.shell[data-shell='split'] .shell-scroll {
		flex: 1;
		min-height: 0;
		overflow: auto;
		overscroll-behavior: contain;
		scrollbar-gutter: stable;
		--shell-cover-top: 0px;
		--shell-cover-bottom: 0px;
	}

	.shell[data-shell='split'] .shell-nav {
		position: static;
		align-self: stretch;
		height: auto;
		min-height: 0;
	}
}

/* ---- A line under the bar only once something has scrolled under it ---- */

/* Where the browser can tie an animation to the scroll position. Elsewhere the line is always there. */
@supports (animation-timeline: scroll()) {
	.shell[data-shell='page'] .shell-bar {
		animation: shell-bar-line linear both;
		animation-timeline: scroll(root);
		animation-range: 0 0.5rem;
	}

	@keyframes shell-bar-line {
		from {
			border-bottom-color: transparent;
		}
	}
}
assets/archive.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Archive</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Archive</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="list">
					<div class="set-state">
						<h2>Nothing archived yet</h2>
						<p>Tasks you archive appear here.</p>
						<a class="set-button" href="index.html">Go to Tasks</a>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/error.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Tasks</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Tasks</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="list">
					<div class="set-tools">
						<ul class="set-filter" aria-label="Show">
							<li><a href="index.html" aria-current="page">All</a></li>
							<li><a href="tasks-overdue.html">Overdue</a></li>
						</ul>
					</div>
					<div class="set-state" role="alert">
						<h2>The tasks didn't load</h2>
						<p>Check the connection, then try again.</p>
						<a class="set-button" href="index.html">Try again</a>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/index.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Tasks</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Tasks</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="list">
					<div class="set-tools">
						<ul class="set-filter" aria-label="Show">
							<li><a href="index.html" aria-current="page">All</a></li>
							<li><a href="tasks-overdue.html">Overdue</a></li>
						</ul>
						<p class="set-count" role="status">8 tasks</p>
					</div>
					<section aria-labelledby="today">
						<h2 class="set-group" id="today">Today</h2>
						<ul class="set-list" role="list">
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="1" />
									<span class="set-hide">Done: Call the dentist</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Call the dentist</a>
									<p class="set-note">Health</p>
								</div>
								<span class="set-meta">09:00</span>
							</li>
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="2" checked />
									<span class="set-hide">Done: Send the October invoice</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Send the October invoice</a>
									<p class="set-note">Work</p>
								</div>
								<span class="set-meta">11:30</span>
							</li>
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="3" />
									<span class="set-hide">Done: Pick up the parcel</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Pick up the parcel</a>
									<p class="set-fail">
										<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="8.5" /><path d="M12 8v4.5M12 16h.01" /></svg>
										The new time wasn't saved.
										<button type="button">Try again</button>
									</p>
								</div>
								<span class="set-meta">17:00</span>
							</li>
						</ul>
					</section>
					<section aria-labelledby="week">
						<h2 class="set-group" id="week">This week</h2>
						<ul class="set-list" role="list">
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="4" />
									<span class="set-hide">Done: Book the train to Hamburg</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Book the train to Hamburg</a>
									<p class="set-note">Travel</p>
								</div>
								<span class="set-meta">Wed</span>
							</li>
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="5" />
									<span class="set-hide">Done: Read the lease again and write down the questions about the heating, the deposit and the notice period</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Read the lease again and write down the questions about the heating, the deposit and the notice period</a>
									<p class="set-note">Home</p>
								</div>
								<span class="set-meta">Thu</span>
							</li>
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="6" />
									<span class="set-hide">Done: Renew the library card</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Renew the library card</a>
									<p class="set-note">Errands</p>
								</div>
								<span class="set-meta">Fri</span>
							</li>
						</ul>
					</section>
					<section aria-labelledby="later">
						<h2 class="set-group" id="later">Later</h2>
						<ul class="set-list" role="list">
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="7" />
									<span class="set-hide">Done: Plan the summer trip</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Plan the summer trip</a>
									<p class="set-note">Travel</p>
								</div>
								<span class="set-meta">12 Dec</span>
							</li>
							<li class="set-row">
								<label class="set-tick">
									<input type="checkbox" name="done" value="8" />
									<span class="set-hide">Done: Back up the laptop</span>
								</label>
								<div class="set-main">
									<a class="set-title" href="task.html">Back up the laptop</a>
									<p class="set-note">Home</p>
								</div>
								<span class="set-meta">20 Dec</span>
							</li>
						</ul>
					</section>
				</div>
			</main>
		</div>
	</body>
</html>
assets/invoice.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>An invoice · Invoices</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="app-navigation.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html" aria-current="true">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<a class="shell-back" href="invoices.html" aria-label="Back to Invoices">
					<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.5 6l-6 6 6 6" /></svg>
					<span>Invoices</span>
				</a>
				<h1 class="shell-title">An invoice</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="shell-page">
					<p>Every row of the table leads here in this example.</p>
					<p>On a phone the table drops the columns it has no room for. This page is where all of them are read.</p>
				</div>
			</main>
		</div>
	</body>
</html>
assets/invoices-2.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Page 2 · Invoices</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
		<script src="select.js" defer></script>
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Invoices</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<!-- A form, because rows can be chosen: Clear is its reset, and works without a script. -->
				<form class="set" data-set="table">
					<div class="set-tools">
						<p class="set-count" role="status">11–14 of 14 invoices, newest first</p>
					</div>

					<table class="set-table">
						<caption class="set-hide">Invoices</caption>
						<thead>
							<tr>
								<!-- "select all" needs a script, so select.js shows it -->
								<td class="set-pick-cell">
									<label class="set-pick" hidden>
										<input type="checkbox" data-set-all />
										<span class="set-hide">Select all on this page</span>
									</label>
								</td>
								<th scope="col">Invoice</th>
								<th scope="col">Customer</th>
								<th scope="col" class="set-minor">Issued</th>
								<th scope="col" class="set-minor">Due</th>
								<th scope="col" class="set-num">Amount, €</th>
								<th scope="col" class="set-minor">Status</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1032" data-set-row />
										<span class="set-hide">Select invoice 1032</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1032</a></th>
								<td class="set-text">Northlight Studio <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-21">21 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-04">4 Nov 2026</time></td>
								<td class="set-num">1,240.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1031" data-set-row />
										<span class="set-hide">Select invoice 1031</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1031</a></th>
								<td class="set-text">Ring Kiosk <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-17">17 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-10-31">31 Oct 2026</time></td>
								<td class="set-num">38.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1030" data-set-row />
										<span class="set-hide">Select invoice 1030</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1030</a></th>
								<td class="set-text">Chain Bike Shop <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-14">14 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-10-28">28 Oct 2026</time></td>
								<td class="set-num">1,075.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1029" data-set-row />
										<span class="set-hide">Select invoice 1029</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1029</a></th>
								<td class="set-text">Sunrise Bakery <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-10">10 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-10-24">24 Oct 2026</time></td>
								<td class="set-num">86.50</td>
								<td class="set-minor">Paid</td>
							</tr>
						</tbody>
					</table>

					<nav class="set-pages" aria-label="Pages">
						<a href="invoices.html" rel="prev">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.5 6l-6 6 6 6" /></svg>
							Previous
						</a>
						<ol>
							<li><a href="invoices.html"><span class="set-hide">Page </span>1</a></li>
							<li><a href="invoices-2.html" aria-current="page"><span class="set-hide">Page </span>2</a></li>
						</ol>
						<p>Page 2 of 2</p>
						<a role="link" aria-disabled="true" tabindex="0">
							Next
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9.5 6l6 6-6 6" /></svg>
						</a>
					</nav>

					<!-- It appears with the first row chosen. In an app "Mark as paid" acts, then offers Undo. -->
					<div class="set-bar" role="group" aria-label="The chosen invoices">
						<output data-set-count="{n} selected" hidden></output>
						<button type="button" class="set-button">Mark as paid</button>
						<button type="reset" class="set-button">Clear</button>
					</div>
				</form>
			</main>
		</div>
	</body>
</html>
assets/invoices.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Invoices</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
		<script src="select.js" defer></script>
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Invoices</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<!-- A form, because rows can be chosen: Clear is its reset, and works without a script. -->
				<form class="set" data-set="table">
					<div class="set-tools">
						<p class="set-count" role="status">1–10 of 14 invoices, newest first</p>
					</div>

					<table class="set-table">
						<caption class="set-hide">Invoices</caption>
						<thead>
							<tr>
								<!-- "select all" needs a script, so select.js shows it -->
								<td class="set-pick-cell">
									<label class="set-pick" hidden>
										<input type="checkbox" data-set-all />
										<span class="set-hide">Select all on this page</span>
									</label>
								</td>
								<th scope="col">Invoice</th>
								<th scope="col">Customer</th>
								<th scope="col" class="set-minor">Issued</th>
								<th scope="col" class="set-minor">Due</th>
								<th scope="col" class="set-num">Amount, €</th>
								<th scope="col" class="set-minor">Status</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1042" data-set-row />
										<span class="set-hide">Select invoice 1042</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1042</a></th>
								<td class="set-text">Northlight Studio <span class="set-under">Open, due <time datetime="2026-12-08">8 Dec</time></span></td>
								<td class="set-minor"><time datetime="2026-11-24">24 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-12-08">8 Dec 2026</time></td>
								<td class="set-num">1,240.00</td>
								<td class="set-minor">Open</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1041" data-set-row />
										<span class="set-hide">Select invoice 1041</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1041</a></th>
								<td class="set-text">Sunrise Bakery <span class="set-under">Open, due <time datetime="2026-12-05">5 Dec</time></span></td>
								<td class="set-minor"><time datetime="2026-11-21">21 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-12-05">5 Dec 2026</time></td>
								<td class="set-num">86.50</td>
								<td class="set-minor">Open</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1040" data-set-row />
										<span class="set-hide">Select invoice 1040</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1040</a></th>
								<td class="set-text">Hartmann and Partners, Attorneys at Law <span class="set-under">Open, due <time datetime="2026-12-02">2 Dec</time></span></td>
								<td class="set-minor"><time datetime="2026-11-18">18 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-12-02">2 Dec 2026</time></td>
								<td class="set-num">12,400.00</td>
								<td class="set-minor">Open</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1039" data-set-row />
										<span class="set-hide">Select invoice 1039</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1039</a></th>
								<td class="set-text">Atelier Voss <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-11-14">14 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-28">28 Nov 2026</time></td>
								<td class="set-num">310.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1038" data-set-row />
										<span class="set-hide">Select invoice 1038</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1038</a></th>
								<td class="set-text">Ring Kiosk <span class="set-under">Overdue, due <time datetime="2026-11-25">25 Nov</time></span></td>
								<td class="set-minor"><time datetime="2026-11-11">11 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-25">25 Nov 2026</time></td>
								<td class="set-num">42.00</td>
								<td class="set-minor">Overdue</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1037" data-set-row />
										<span class="set-hide">Select invoice 1037</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1037</a></th>
								<td class="set-text">Northlight Studio <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-11-07">7 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-21">21 Nov 2026</time></td>
								<td class="set-num">1,240.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1036" data-set-row />
										<span class="set-hide">Select invoice 1036</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1036</a></th>
								<td class="set-text">Chain Bike Shop <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-11-04">4 Nov 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-18">18 Nov 2026</time></td>
								<td class="set-num">529.90</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1035" data-set-row />
										<span class="set-hide">Select invoice 1035</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1035</a></th>
								<td class="set-text">Lehmann Dental Practice <span class="set-under">Overdue, due <time datetime="2026-11-14">14 Nov</time></span></td>
								<td class="set-minor"><time datetime="2026-10-31">31 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-14">14 Nov 2026</time></td>
								<td class="set-num">2,180.00</td>
								<td class="set-minor">Overdue</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1034" data-set-row />
										<span class="set-hide">Select invoice 1034</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1034</a></th>
								<td class="set-text">Atelier Voss <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-28">28 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-11">11 Nov 2026</time></td>
								<td class="set-num">95.00</td>
								<td class="set-minor">Paid</td>
							</tr>
							<tr>
								<td class="set-pick-cell">
									<label class="set-pick">
										<input type="checkbox" name="invoice" value="1033" data-set-row />
										<span class="set-hide">Select invoice 1033</span>
									</label>
								</td>
								<th scope="row"><a class="set-title" href="invoice.html">1033</a></th>
								<td class="set-text">Page One Books <span class="set-under">Paid</span></td>
								<td class="set-minor"><time datetime="2026-10-24">24 Oct 2026</time></td>
								<td class="set-minor"><time datetime="2026-11-07">7 Nov 2026</time></td>
								<td class="set-num">164.20</td>
								<td class="set-minor">Paid</td>
							</tr>
						</tbody>
					</table>

					<nav class="set-pages" aria-label="Pages">
						<a role="link" aria-disabled="true" tabindex="0">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.5 6l-6 6 6 6" /></svg>
							Previous
						</a>
						<ol>
							<li><a href="invoices.html" aria-current="page"><span class="set-hide">Page </span>1</a></li>
							<li><a href="invoices-2.html"><span class="set-hide">Page </span>2</a></li>
						</ol>
						<p>Page 1 of 2</p>
						<a href="invoices-2.html" rel="next">
							Next
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9.5 6l6 6-6 6" /></svg>
						</a>
					</nav>

					<!-- It appears with the first row chosen. In an app "Mark as paid" acts, then offers Undo. -->
					<div class="set-bar" role="group" aria-label="The chosen invoices">
						<output data-set-count="{n} selected" hidden></output>
						<button type="button" class="set-button">Mark as paid</button>
						<button type="reset" class="set-button">Clear</button>
					</div>
				</form>
			</main>
		</div>
	</body>
</html>
assets/lists-and-tables.css Show
/*
 * lists-and-tables.css: a set of things, as a list or as a table. It stands on app-shell.css,
 * which is beside it; load that first.
 *
 * Copy this file. Keep every line marked TRAP. Everything here starts with `set-`.
 *
 * The whole set: what narrows it, its rows, what moves through it.
 *
 *   <form class="set" data-set="list">                  a form only where rows can be chosen
 *     <div class="set-tools"> <ul class="set-filter"> <li><a href aria-current="page">All</a>
 *                             <p class="set-count" role="status">8 tasks</p>
 *     <section aria-labelledby="g1">
 *       <h2 class="set-group" id="g1">Today</h2>
 *       <ul class="set-list" role="list">
 *         <li class="set-row">
 *           <label class="set-tick"><input type="checkbox" /><span class="set-hide">Done: …</span></label>
 *           <div class="set-main"> <a class="set-title" href="/tasks/1">Call the dentist</a>
 *                                  <p class="set-note">Health</p>
 *           <span class="set-meta">09:00</span>
 *
 * A table that fits its page: the columns a phone has no room for are `set-minor`.
 *
 *   <div class="set" data-set="table">
 *     <table class="set-table"> <caption class="set-hide">Invoices</caption>
 *       <thead><tr> <th scope="col" aria-sort="descending"><a class="set-sort" href>Invoice <svg/></a>
 *                   <th scope="col" class="set-minor">Issued   <th scope="col" class="set-num">Amount
 *       <tbody><tr> <th scope="row"><a class="set-title" href="/invoices/1042">1042</a>
 *                   <td class="set-minor">3 Nov 2026        <td class="set-num">1,240.00
 *     <nav class="set-pages" aria-label="Pages">
 *
 * A table wider than its room, to compare across: the shell is a workspace and the table's region
 * is the part that scrolls, both ways, with the header and the first column held.
 *
 *   <div class="set" data-set="table">
 *     <div class="shell-scroll set-region" role="region" aria-labelledby="cap" tabindex="0">
 *       <table class="set-table"> <caption id="cap" class="set-hide">…
 *         <th scope="row" class="set-hold">
 *
 * Working examples: index.html (a list), invoices.html (a table that fits), revenue.html (a wide
 * table), loading.html, error.html, archive.html (empty), tasks-overdue.html (no results).
 */

:root {
	--set-row: 3.25rem; /* a row of two lines */
	--set-cell-x: 0.75rem; /* a table cell's side padding */
	--set-cell-y: 0.625rem; /* and above and below: a row of one line is 44px */
	--set-list-width: 48rem; /* a list is never wider: a row's two ends stay in one glance */
	--set-table-width: 80rem; /* nor a table: its first and last column still belong together */
	--set-alert: CanvasText; /* what failed. The base has no red: a glyph and the words say it */
}

/* ---- The whole ---- */

/* TRAP: a `display` of the author's beats the `hidden` attribute. What is hidden stays hidden. */
.set [hidden] {
	display: none !important;
}

.set {
	/* the parts answer to the room the set has, not to the window */
	container: set / inline-size;
	display: flex;
	flex-direction: column;
	/* TRAP: as in the frame. Without it one wide row or table widens the page. */
	min-width: 0;
	margin: 0;
	padding-bottom: 2rem;
}

.set[data-set='list'] {
	max-width: var(--set-list-width);
}

.set[data-set='table'] {
	max-width: var(--set-table-width);
}

/* In a fixed window the set fills it, and one part of it scrolls. */
.shell[data-shell='workspace'] .set {
	flex: 1;
	max-width: none;
	min-height: 0;
	padding-bottom: 0;
}

.set *,
.set *::before,
.set *::after {
	box-sizing: border-box;
}

/* For assistive tech only: a name for a checkbox, a table's caption that the bar already shows. */
.set-hide {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---- The tools above it: what narrows the set, and how many it holds ---- */

.set-tools {
	display: flex;
	/* TRAP: a row of tools that can't wrap pushes its end off a phone's screen */
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.75rem var(--shell-gutter);
}

/* A search field comes first and takes the room that is left. */
.set-search {
	flex: 1 1 14rem;
	/* TRAP: a field never shrinks below its default width without this */
	min-width: 0;
	max-width: 24rem;
	min-height: var(--shell-hit);
	padding-inline: 0.75rem;
	border: 1px solid var(--shell-line);
	border-radius: 0.5rem;
	background: var(--shell-surface);
	color: inherit;
	/* TRAP: 16px. iOS zooms the page when a field with smaller text takes focus. */
	font: inherit;
}

/* Filters are links: each is a view with an address. */
.set-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	/* the first filter's words, not its ground, sit on the content's edge */
	margin-inline-start: -0.75rem;
	padding: 0;
	list-style: none;
}

.set-filter a {
	display: inline-flex;
	align-items: center;
	min-height: var(--shell-hit);
	padding-inline: 0.75rem;
	border-radius: 999px;
	color: var(--shell-muted);
	font-size: 0.9375rem;
	text-decoration: none;
	white-space: nowrap;
}

/* Marked by its ground, not by a heavier weight: that would change its width between views. */
.set-filter a[aria-current] {
	background: var(--shell-current);
	color: var(--shell-text);
}

/* A line of words among the tools: what the set is, in what unit. */
.set-tools p {
	margin: 0;
	color: var(--shell-muted);
	font-size: 0.875rem;
}

/* How many the set holds, or which of them show. A status: a change is read out. */
.set-tools .set-count {
	margin-inline-start: auto;
	font-variant-numeric: tabular-nums;
}

/* alone among the tools it starts where the rows do */
.set-tools .set-count:first-child {
	margin-inline-start: 0;
}

/* ---- A list ---- */

/* A group's heading stays in view while its rows pass. Each group is a <section>: the heading
   sticks only as long as its own rows are there. */
.set-group {
	position: sticky;
	top: var(--shell-cover-top);
	/* TRAP: above the rows' own controls, which are raised too, or a checkbox passes over it */
	z-index: 2;
	margin: 0;
	/* rows close, groups apart: the space above a group is more than twice a row's own */
	padding: 1.25rem var(--shell-gutter) 0.375rem;
	background: var(--shell-surface);
	color: var(--shell-muted);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
}

/* TRAP: a row that takes focus right under the heading that stays would be hidden by it. The
   margin is the heading's height: the browser scrolls the row out from under it. */
.set-row :is(a, button, input, select) {
	scroll-margin-top: 3rem;
}

.set-list {
	margin: 0;
	/* with the row's own padding: the text sits on the content's edge, the ground reaches past it */
	padding: 0 0.5rem;
	list-style: none;
}

.set-row {
	/* the title's link covers the row from here */
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: max(var(--set-row), var(--shell-hit));
	padding: 0.5rem calc(var(--shell-gutter) - 0.5rem);
	border-radius: 0.5rem;
}

.set-main {
	flex: 1;
	/* TRAP: a flex child never shrinks below its text. Without this a long title pushes the row's
	   end off the screen instead of ending in an ellipsis. */
	min-width: 0;
}

/* The row's one link: what the row opens. In a table it is the row's name. */
.set-title {
	display: block;
	overflow: hidden;
	color: inherit;
	font-weight: 500;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* TRAP: the whole row is the target, and still one link. Never a click handler on the row, and
   never a link around the row: a link must not hold another control. */
.set-row .set-title::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

/* Everything else on the row that can be used lies above that link. */
.set-row :is(button, input, select, label, a:not(.set-title)) {
	position: relative;
	z-index: 1;
}

/* The ring goes around the row, since the row is what the link covers. */
.set-row .set-title:focus-visible {
	outline: none;
}

.set-row:has(.set-title:focus-visible) {
	outline: 2px solid var(--shell-focus);
	outline-offset: -2px;
}

.set-note {
	margin: 0;
	overflow: hidden;
	color: var(--shell-muted);
	font-size: 0.875rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The one fact at the row's end: a time, an amount, a count. */
.set-meta {
	flex: none;
	/* TRAP: it is short. If it isn't, it ends in an ellipsis before it takes the title's room. */
	max-width: 45%;
	overflow: hidden;
	color: var(--shell-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The row that is open beside the list (app-navigation's two panes). */
.set-row:has(.set-title[aria-current='page']) {
	background: var(--shell-current);
}

/* TRAP: only a pointer that can hover gets a hover; on a touch screen it sticks to the last row
   tapped. And only a row that opens something answers to it. */
@media (hover: hover) {
	.set-row:has(.set-title[href]):hover {
		background: var(--shell-current);
	}
}

/* ---- A checkbox on a row ---- */

/* set-tick: the row's one quick act (done). set-pick: choosing rows to act on several at once.
   Both are a label around a checkbox, so the target is the size of a finger and the box is not. */
.set-tick,
.set-pick {
	display: grid;
	flex: none;
	place-items: center;
	width: var(--shell-hit);
	height: var(--shell-hit);
	/* the box, not its target, sits on the content's edge */
	margin-inline: calc((var(--shell-hit) - 1.125rem) / -2);
	border-radius: 0.5rem;
	cursor: pointer;
	user-select: none;
}

.set-tick input,
.set-pick input {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	cursor: inherit;
}

/* Done stays readable: quieter, never crossed out. */
.set-row:has(.set-tick :checked) .set-title {
	color: var(--shell-muted);
	font-weight: 400;
}

/* ---- A row's own state ---- */

/* Busy: the row waits for its own change. The rest of the set stays usable. */
.set-row[aria-busy='true'] .set-main {
	opacity: 0.55;
}

/* Failed: the row says so itself, with the way to try again. No banner for the page. */
.set-fail {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 0.5rem;
	margin: 0;
	color: var(--set-alert);
	font-size: 0.875rem;
}

.set-fail svg {
	flex: none;
	width: 1rem;
	height: 1rem;
}

.set-fail button {
	/* a target the size of the others, in a line no taller than the note it stands for */
	min-height: var(--shell-hit);
	margin-block: calc((var(--shell-hit) - 1.5em) / -2);
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* ---- A table ---- */

.set-table {
	width: 100%;
	/* TRAP: with collapsed borders a held cell's lines stay behind when it sticks. Separate
	   borders travel with their cell. */
	border-collapse: separate;
	border-spacing: 0;
	/* TRAP: digits of one width, so the places of a column stand under each other */
	font-variant-numeric: tabular-nums;
}

.set-table :is(th, td) {
	padding: var(--set-cell-y) var(--set-cell-x);
	border-bottom: 1px solid var(--shell-line);
	font-weight: 400;
	/* text starts at the leading edge; a cell that wraps keeps its first line level with the row's */
	text-align: start;
	vertical-align: baseline;
	/* TRAP: a cell wraps between words, never inside one. (The frame lets a long word break
	   anywhere; in a table that makes every column give a little, and "Overdue" is cut in two
	   while the column beside it has room.) */
	overflow-wrap: break-word;
}

/* TRAP: one column gives way: the one that may hold a long piece without a space (a name, an
   address, a file's name). Without it such a piece is wider than a phone and widens the page. */
.set-table .set-text {
	overflow-wrap: anywhere;
}

/* a date is one piece */
.set-table time {
	white-space: nowrap;
}

/* the first and last column stand on the content's edges */
.set-table :is(th, td):first-child {
	padding-inline-start: var(--shell-gutter);
}

.set-table :is(th, td):last-child {
	padding-inline-end: var(--shell-gutter);
}

/* The header stays in view while its rows pass, under the frame's bar. On the cells: older
   browsers hold a header's cells but not its <thead>. */
.set-table thead :is(th, td) {
	position: sticky;
	top: var(--shell-cover-top);
	z-index: 2;
	padding-block: 0;
	background: var(--shell-surface);
	color: var(--shell-muted);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: var(--shell-hit);
	vertical-align: bottom;
	white-space: nowrap;
}

/* TRAP: the same for a row that takes focus right under the header, and above the bar of acts
   while rows are chosen. */
.set-table tbody :is(a, button, input, select) {
	scroll-margin-top: calc(var(--shell-hit) + 0.5rem);
}

.set:has(input[data-set-row]:checked) :is(.set-table tbody, .set-pages) :is(a, button, input, select) {
	scroll-margin-bottom: 5rem;
}

/* TRAP: numbers stand at the trailing edge, their header with them, and never wrap. */
.set-table .set-num {
	text-align: end;
	white-space: nowrap;
}

/* The row's name: its header cell. */
.set-table tbody th {
	font-weight: 500;
}

/* Its link fills the cell, so the target is as tall as the row. */
.set-table .set-title {
	margin-block: calc(var(--set-cell-y) * -1);
	padding-block: var(--set-cell-y);
	white-space: normal;
}

/* A column for choosing rows: as narrow as the box, the box level with the row's first line. */
.set-table .set-pick-cell {
	width: 1%;
	padding-block: 0;
	padding-inline-end: 0;
	vertical-align: top;
}

.set-table .set-pick {
	height: calc(1.5em + var(--set-cell-y) * 2);
}

.set-table thead .set-pick {
	height: var(--shell-hit);
}

.set-table tbody tr:has(.set-pick :checked) > * {
	background: var(--shell-current);
}

@media (hover: hover) {
	.set-table tbody tr:hover > * {
		background: var(--shell-recess);
	}

	.set-table tbody tr:has(.set-pick :checked):hover > * {
		background: var(--shell-current);
	}
}

/* ---- Sorting ---- */

/* The control in a header cell: a link where the order is in the address, a button where a
   script sorts in place. `aria-sort` on the <th> of the one column the set is sorted by. */
.set-sort {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	min-height: var(--shell-hit);
	padding: 0;
	border: 0;
	border-radius: 0.25rem;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}

/* the arrow comes before a number's header, so the words still end on the column's edge */
.set-num .set-sort {
	flex-direction: row-reverse;
}

/* The arrow points down: descending. It shows on the sorted column only. */
.set-sort svg {
	flex: none;
	width: 0.875rem;
	height: 0.875rem;
	opacity: 0;
}

th[aria-sort='ascending'] .set-sort,
th[aria-sort='descending'] .set-sort {
	color: var(--shell-text);
}

th[aria-sort='ascending'] .set-sort svg,
th[aria-sort='descending'] .set-sort svg {
	opacity: 1;
}

th[aria-sort='ascending'] .set-sort svg {
	transform: scaleY(-1);
}

/* a column that can be sorted says so before it is: a fainter arrow under the pointer or focus */
.set-sort:focus-visible svg {
	opacity: 0.5;
}

@media (hover: hover) {
	.set-sort:hover {
		color: var(--shell-text);
	}

	th:not([aria-sort='ascending'], [aria-sort='descending']) .set-sort:hover svg {
		opacity: 0.5;
	}
}

/* ---- A table on a phone ---- */

/* TRAP: a table is never squeezed, and never widens the page. One of two, decided per table:
   drop the columns a phone has no room for, or keep every column and let the table's region
   scroll. */

/* What a dropped column said and a phone still has to show: a line under the row's name. */
.set-under {
	display: none;
	color: var(--shell-muted);
	font-size: 0.875rem;
	font-weight: 400;
}

/* 45rem is this base's number, for about seven columns. A table with more columns, or longer
   ones, needs more room before it shows them all: raise it until no row takes three lines. (A
   custom property can't stand in a container query, so the number is here.) */
@container set (max-width: 45rem) {
	.set-table {
		--set-cell-x: 0.5rem;
	}

	.set-table .set-minor {
		display: none;
	}

	.set-under {
		display: block;
	}
}

/* The region: the part of a workspace that scrolls, both ways. It has a name and takes focus, so
   a keyboard can scroll it. */
.set-region {
	/* TRAP: at its end a sideways scroll would go on as the browser's Back */
	overscroll-behavior-x: contain;
}

.set-region:focus-visible {
	outline-offset: -2px;
}

/* TRAP: a held header sticks to the nearest scroller. Inside a region that is this region, so
   only a region that scrolls both ways can hold the header and scroll sideways. */
.set-region .set-table {
	/* TRAP: a table that may scroll is as wide as its columns need. Squeezed to the window first,
	   its words break in their middle. */
	width: max-content;
	min-width: 100%;
}

.set-region .set-table :is(th, td) {
	white-space: nowrap;
}

/* The column that says what a row is stays while the others pass under it. */
.set-region .set-hold {
	position: sticky;
	inset-inline-start: 0;
	z-index: 1;
	background: var(--shell-surface);
	/* TRAP: a held cell needs a ground of its own, or the columns show through it; and a line at
	   its edge, or nothing says that something is under it */
	border-inline-end: 1px solid var(--shell-line);
	/* TRAP: a long name wraps instead of taking the region: the held column leaves more than half
	   of it to the columns that scroll */
	max-width: min(16rem, 45cqi);
	overflow-wrap: break-word;
	white-space: normal;
}

/* the corner: above the header's row and the held column */
.set-region thead .set-hold {
	z-index: 3;
}

@media (hover: hover) {
	.set-region tbody tr:hover > .set-hold {
		background: var(--shell-recess);
	}
}

/* ---- The bar of acts for the rows that are chosen ---- */

/* It appears with the first row chosen and stays at the lower edge, above the frame's own bar,
   in reach while the rows scroll. */
.set-bar {
	position: sticky;
	bottom: calc(var(--shell-cover-bottom) + 0.75rem);
	z-index: 3;
	display: none;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	align-self: center;
	max-width: calc(100% - var(--shell-gutter) * 2);
	margin: 0.75rem var(--shell-gutter) 0;
	padding: 0.5rem;
	border: 1px solid var(--shell-line);
	border-radius: 0.75rem;
	background: var(--shell-surface);
	box-shadow: 0 0.25rem 1rem color-mix(in srgb, CanvasText 16%, transparent);
}

.set:has(input[data-set-row]:checked) .set-bar {
	display: flex;
}

/* in a fixed window it is a row of its own under the part that scrolls */
.shell[data-shell='workspace'] .set-bar {
	position: static;
	margin-block: 0.75rem;
}

.set-bar output {
	padding-inline: 0.5rem;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}

/* ---- Pages ---- */

.set-pages {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.75rem var(--shell-gutter);
}

.set-pages ol {
	/* TRAP: a row of page numbers is wider than a phone. Narrow, the sentence stands for it. */
	display: none;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.set-pages p {
	flex: 1;
	margin: 0;
	color: var(--shell-muted);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	text-align: center;
	white-space: nowrap;
}

.set-pages a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-width: var(--shell-hit);
	min-height: var(--shell-hit);
	padding-inline: 0.5rem;
	border-radius: 0.5rem;
	color: inherit;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
}

.set-pages svg {
	flex: none;
	width: 1rem;
	height: 1rem;
}

[dir='rtl'] .set-pages svg {
	transform: scaleX(-1);
}

/* the first step's arrow, not its ground, sits on the content's edge */
.set-pages > a:first-child {
	margin-inline-start: -0.5rem;
}

.set-pages a[aria-current='page'] {
	background: var(--shell-current);
	font-weight: 600;
}

/* TRAP: at the first and the last page a step can't be taken, and stays where it is and in
   reach of the keyboard. A control that disables itself drops the focus that was on it. */
.set-pages a[aria-disabled='true'] {
	color: var(--shell-muted);
	opacity: 0.6;
	cursor: default;
}

@media (hover: hover) {
	.set-pages a:not([aria-disabled='true'], [aria-current='page']):hover {
		background: var(--shell-current);
	}
}

@container set (min-width: 34rem) {
	.set-pages ol {
		display: flex;
	}

	.set-pages p {
		display: none;
	}
}

/* ---- The states of the whole set ---- */

/* Empty, no results, failed, no access: in the place where the rows would be, with what to do. */
.set-state {
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	width: 100%;
	max-width: 26rem;
	margin-inline: auto;
	padding: 3rem var(--shell-gutter);
	text-align: center;
}

.set-state h2 {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
}

.set-state p {
	margin: 0;
	color: var(--shell-muted);
}

.set-state .set-button {
	margin-top: 0.5rem;
}

/* A plain key, for the states and the bar. Use the project's own button where it has one. */
.set-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--shell-hit);
	padding-inline: 0.875rem;
	border: 1px solid var(--shell-line);
	border-radius: 0.5rem;
	background: var(--shell-surface);
	color: var(--shell-text);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

@media (hover: hover) {
	.set-button:hover {
		background: var(--shell-current);
	}
}

/* Loading: rows of the real geometry with bars where the words will be, so nothing moves when
   they arrive. A bar stands inside the row's own parts and takes their line height. */
.set-bone {
	display: inline-block;
	width: var(--bone, 8rem);
	max-width: 100%;
	height: 0.625em;
	border-radius: 999px;
	background: var(--shell-current);
	vertical-align: middle;
}

/* in place of a checkbox */
.set-tick .set-bone {
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 0.25rem;
}

/* TRAP: it moves only for people who haven't asked for less motion */
@media (prefers-reduced-motion: no-preference) {
	.set-bone {
		animation: set-wait 1.2s ease-in-out infinite alternate;
	}

	@keyframes set-wait {
		to {
			opacity: 0.45;
		}
	}
}
assets/loading.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Tasks</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Tasks</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="list" aria-busy="true">
					<div class="set-tools">
						<ul class="set-filter" aria-label="Show">
							<li><a href="index.html" aria-current="page">All</a></li>
							<li><a href="tasks-overdue.html">Overdue</a></li>
						</ul>
					</div>
					<p class="set-hide" role="status">Loading tasks</p>
					<div aria-hidden="true">
						<section>
							<h2 class="set-group"><span class="set-bone" style="--bone: 3rem"></span></h2>
							<ul class="set-list">
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 9rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 3rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 2.25rem"></span></span>
								</li>
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 12rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 2.5rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 2.25rem"></span></span>
								</li>
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 10rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 3.5rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 2.25rem"></span></span>
								</li>
							</ul>
						</section>
						<section>
							<h2 class="set-group"><span class="set-bone" style="--bone: 4.5rem"></span></h2>
							<ul class="set-list">
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 13rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 3rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 1.75rem"></span></span>
								</li>
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 16rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 2.75rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 1.75rem"></span></span>
								</li>
								<li class="set-row">
									<span class="set-tick"><span class="set-bone"></span></span>
									<div class="set-main">
										<span class="set-title"><span class="set-bone" style="--bone: 11rem"></span></span>
										<p class="set-note"><span class="set-bone" style="--bone: 3.5rem"></span></p>
									</div>
									<span class="set-meta"><span class="set-bone" style="--bone: 1.75rem"></span></span>
								</li>
							</ul>
						</section>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/revenue-by-total-up.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Revenue</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="workspace">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Revenue</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="table">
					<div class="set-tools">
						<p>2025, in euros</p>
						<p class="set-count" role="status">12 products, lowest total first</p>
					</div>

					<!-- The part that scrolls, both ways. It has a name and takes focus, so a keyboard can scroll it. -->
					<div class="shell-scroll set-region" role="region" aria-labelledby="revenue" tabindex="0">
						<table class="set-table">
							<caption class="set-hide" id="revenue">Revenue 2025 by product, in euros. The headers Product and Total sort it.</caption>
							<thead>
								<tr>
									<th scope="col" class="set-hold">
										<a class="set-sort" href="revenue.html">
											Product
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
									<th scope="col" class="set-num">Jan</th> <th scope="col" class="set-num">Feb</th> <th scope="col" class="set-num">Mar</th> <th scope="col" class="set-num">Apr</th> <th scope="col" class="set-num">May</th> <th scope="col" class="set-num">Jun</th> <th scope="col" class="set-num">Jul</th> <th scope="col" class="set-num">Aug</th> <th scope="col" class="set-num">Sep</th> <th scope="col" class="set-num">Oct</th> <th scope="col" class="set-num">Nov</th> <th scope="col" class="set-num">Dec</th>
									<th scope="col" class="set-num" aria-sort="ascending">
										<a class="set-sort" href="revenue-by-total.html">
											Total
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<th scope="row" class="set-hold">Ruler, 30 cm</th>
									<td class="set-num">71</td> <td class="set-num">65</td> <td class="set-num">80</td> <td class="set-num">82</td> <td class="set-num">81</td> <td class="set-num">82</td> <td class="set-num">73</td> <td class="set-num">100</td> <td class="set-num">110</td> <td class="set-num">87</td> <td class="set-num">108</td> <td class="set-num">134</td> <td class="set-num">1,073</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Envelopes C6</th>
									<td class="set-num">78</td> <td class="set-num">70</td> <td class="set-num">88</td> <td class="set-num">89</td> <td class="set-num">100</td> <td class="set-num">89</td> <td class="set-num">79</td> <td class="set-num">109</td> <td class="set-num">120</td> <td class="set-num">108</td> <td class="set-num">118</td> <td class="set-num">146</td> <td class="set-num">1,194</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Washi tape</th>
									<td class="set-num">107</td> <td class="set-num">96</td> <td class="set-num">120</td> <td class="set-num">122</td> <td class="set-num">136</td> <td class="set-num">122</td> <td class="set-num">109</td> <td class="set-num">149</td> <td class="set-num">165</td> <td class="set-num">147</td> <td class="set-num">161</td> <td class="set-num">200</td> <td class="set-num">1,634</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Postcards</th>
									<td class="set-num">192</td> <td class="set-num">197</td> <td class="set-num">216</td> <td class="set-num">219</td> <td class="set-num">246</td> <td class="set-num">220</td> <td class="set-num">222</td> <td class="set-num">269</td> <td class="set-num">296</td> <td class="set-num">266</td> <td class="set-num">290</td> <td class="set-num">408</td> <td class="set-num">3,041</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ink, black</th>
									<td class="set-num">248</td> <td class="set-num">254</td> <td class="set-num">279</td> <td class="set-num">283</td> <td class="set-num">318</td> <td class="set-num">284</td> <td class="set-num">286</td> <td class="set-num">347</td> <td class="set-num">383</td> <td class="set-num">343</td> <td class="set-num">375</td> <td class="set-num">527</td> <td class="set-num">3,927</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Desk pad</th>
									<td class="set-num">327</td> <td class="set-num">336</td> <td class="set-num">369</td> <td class="set-num">423</td> <td class="set-num">420</td> <td class="set-num">375</td> <td class="set-num">379</td> <td class="set-num">459</td> <td class="set-num">573</td> <td class="set-num">454</td> <td class="set-num">495</td> <td class="set-num">697</td> <td class="set-num">5,307</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Pencil set</th>
									<td class="set-num">443</td> <td class="set-num">400</td> <td class="set-num">498</td> <td class="set-num">505</td> <td class="set-num">567</td> <td class="set-num">508</td> <td class="set-num">451</td> <td class="set-num">620</td> <td class="set-num">684</td> <td class="set-num">612</td> <td class="set-num">670</td> <td class="set-num">831</td> <td class="set-num">6,789</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Sketchbook</th>
									<td class="set-num">592</td> <td class="set-num">608</td> <td class="set-num">667</td> <td class="set-num">766</td> <td class="set-num">760</td> <td class="set-num">679</td> <td class="set-num">686</td> <td class="set-num">830</td> <td class="set-num">1,037</td> <td class="set-num">821</td> <td class="set-num">895</td> <td class="set-num">1,262</td> <td class="set-num">9,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A4</th>
									<td class="set-num">1,059</td> <td class="set-num">958</td> <td class="set-num">1,191</td> <td class="set-num">1,210</td> <td class="set-num">1,197</td> <td class="set-num">1,214</td> <td class="set-num">1,081</td> <td class="set-num">1,482</td> <td class="set-num">1,638</td> <td class="set-num">1,293</td> <td class="set-num">1,601</td> <td class="set-num">1,990</td> <td class="set-num">15,914</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A5</th>
									<td class="set-num">1,433</td> <td class="set-num">1,471</td> <td class="set-num">1,615</td> <td class="set-num">1,855</td> <td class="set-num">1,840</td> <td class="set-num">1,643</td> <td class="set-num">1,660</td> <td class="set-num">2,009</td> <td class="set-num">2,512</td> <td class="set-num">1,987</td> <td class="set-num">2,168</td> <td class="set-num">3,055</td> <td class="set-num">23,248</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Fountain pen</th>
									<td class="set-num">2,049</td> <td class="set-num">1,856</td> <td class="set-num">2,035</td> <td class="set-num">2,342</td> <td class="set-num">2,320</td> <td class="set-num">2,349</td> <td class="set-num">2,094</td> <td class="set-num">2,532</td> <td class="set-num">3,171</td> <td class="set-num">2,506</td> <td class="set-num">3,099</td> <td class="set-num">3,856</td> <td class="set-num">30,209</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Planner</th>
									<td class="set-num">2,686</td> <td class="set-num">2,434</td> <td class="set-num">2,668</td> <td class="set-num">3,070</td> <td class="set-num">3,042</td> <td class="set-num">3,079</td> <td class="set-num">2,746</td> <td class="set-num">3,320</td> <td class="set-num">4,157</td> <td class="set-num">3,285</td> <td class="set-num">4,062</td> <td class="set-num">5,054</td> <td class="set-num">39,603</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/revenue-by-total.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Revenue</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="workspace">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Revenue</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="table">
					<div class="set-tools">
						<p>2025, in euros</p>
						<p class="set-count" role="status">12 products, highest total first</p>
					</div>

					<!-- The part that scrolls, both ways. It has a name and takes focus, so a keyboard can scroll it. -->
					<div class="shell-scroll set-region" role="region" aria-labelledby="revenue" tabindex="0">
						<table class="set-table">
							<caption class="set-hide" id="revenue">Revenue 2025 by product, in euros. The headers Product and Total sort it.</caption>
							<thead>
								<tr>
									<th scope="col" class="set-hold">
										<a class="set-sort" href="revenue.html">
											Product
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
									<th scope="col" class="set-num">Jan</th> <th scope="col" class="set-num">Feb</th> <th scope="col" class="set-num">Mar</th> <th scope="col" class="set-num">Apr</th> <th scope="col" class="set-num">May</th> <th scope="col" class="set-num">Jun</th> <th scope="col" class="set-num">Jul</th> <th scope="col" class="set-num">Aug</th> <th scope="col" class="set-num">Sep</th> <th scope="col" class="set-num">Oct</th> <th scope="col" class="set-num">Nov</th> <th scope="col" class="set-num">Dec</th>
									<th scope="col" class="set-num" aria-sort="descending">
										<a class="set-sort" href="revenue-by-total-up.html">
											Total
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<th scope="row" class="set-hold">Planner</th>
									<td class="set-num">2,686</td> <td class="set-num">2,434</td> <td class="set-num">2,668</td> <td class="set-num">3,070</td> <td class="set-num">3,042</td> <td class="set-num">3,079</td> <td class="set-num">2,746</td> <td class="set-num">3,320</td> <td class="set-num">4,157</td> <td class="set-num">3,285</td> <td class="set-num">4,062</td> <td class="set-num">5,054</td> <td class="set-num">39,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Fountain pen</th>
									<td class="set-num">2,049</td> <td class="set-num">1,856</td> <td class="set-num">2,035</td> <td class="set-num">2,342</td> <td class="set-num">2,320</td> <td class="set-num">2,349</td> <td class="set-num">2,094</td> <td class="set-num">2,532</td> <td class="set-num">3,171</td> <td class="set-num">2,506</td> <td class="set-num">3,099</td> <td class="set-num">3,856</td> <td class="set-num">30,209</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A5</th>
									<td class="set-num">1,433</td> <td class="set-num">1,471</td> <td class="set-num">1,615</td> <td class="set-num">1,855</td> <td class="set-num">1,840</td> <td class="set-num">1,643</td> <td class="set-num">1,660</td> <td class="set-num">2,009</td> <td class="set-num">2,512</td> <td class="set-num">1,987</td> <td class="set-num">2,168</td> <td class="set-num">3,055</td> <td class="set-num">23,248</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A4</th>
									<td class="set-num">1,059</td> <td class="set-num">958</td> <td class="set-num">1,191</td> <td class="set-num">1,210</td> <td class="set-num">1,197</td> <td class="set-num">1,214</td> <td class="set-num">1,081</td> <td class="set-num">1,482</td> <td class="set-num">1,638</td> <td class="set-num">1,293</td> <td class="set-num">1,601</td> <td class="set-num">1,990</td> <td class="set-num">15,914</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Sketchbook</th>
									<td class="set-num">592</td> <td class="set-num">608</td> <td class="set-num">667</td> <td class="set-num">766</td> <td class="set-num">760</td> <td class="set-num">679</td> <td class="set-num">686</td> <td class="set-num">830</td> <td class="set-num">1,037</td> <td class="set-num">821</td> <td class="set-num">895</td> <td class="set-num">1,262</td> <td class="set-num">9,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Pencil set</th>
									<td class="set-num">443</td> <td class="set-num">400</td> <td class="set-num">498</td> <td class="set-num">505</td> <td class="set-num">567</td> <td class="set-num">508</td> <td class="set-num">451</td> <td class="set-num">620</td> <td class="set-num">684</td> <td class="set-num">612</td> <td class="set-num">670</td> <td class="set-num">831</td> <td class="set-num">6,789</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Desk pad</th>
									<td class="set-num">327</td> <td class="set-num">336</td> <td class="set-num">369</td> <td class="set-num">423</td> <td class="set-num">420</td> <td class="set-num">375</td> <td class="set-num">379</td> <td class="set-num">459</td> <td class="set-num">573</td> <td class="set-num">454</td> <td class="set-num">495</td> <td class="set-num">697</td> <td class="set-num">5,307</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ink, black</th>
									<td class="set-num">248</td> <td class="set-num">254</td> <td class="set-num">279</td> <td class="set-num">283</td> <td class="set-num">318</td> <td class="set-num">284</td> <td class="set-num">286</td> <td class="set-num">347</td> <td class="set-num">383</td> <td class="set-num">343</td> <td class="set-num">375</td> <td class="set-num">527</td> <td class="set-num">3,927</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Postcards</th>
									<td class="set-num">192</td> <td class="set-num">197</td> <td class="set-num">216</td> <td class="set-num">219</td> <td class="set-num">246</td> <td class="set-num">220</td> <td class="set-num">222</td> <td class="set-num">269</td> <td class="set-num">296</td> <td class="set-num">266</td> <td class="set-num">290</td> <td class="set-num">408</td> <td class="set-num">3,041</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Washi tape</th>
									<td class="set-num">107</td> <td class="set-num">96</td> <td class="set-num">120</td> <td class="set-num">122</td> <td class="set-num">136</td> <td class="set-num">122</td> <td class="set-num">109</td> <td class="set-num">149</td> <td class="set-num">165</td> <td class="set-num">147</td> <td class="set-num">161</td> <td class="set-num">200</td> <td class="set-num">1,634</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Envelopes C6</th>
									<td class="set-num">78</td> <td class="set-num">70</td> <td class="set-num">88</td> <td class="set-num">89</td> <td class="set-num">100</td> <td class="set-num">89</td> <td class="set-num">79</td> <td class="set-num">109</td> <td class="set-num">120</td> <td class="set-num">108</td> <td class="set-num">118</td> <td class="set-num">146</td> <td class="set-num">1,194</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ruler, 30 cm</th>
									<td class="set-num">71</td> <td class="set-num">65</td> <td class="set-num">80</td> <td class="set-num">82</td> <td class="set-num">81</td> <td class="set-num">82</td> <td class="set-num">73</td> <td class="set-num">100</td> <td class="set-num">110</td> <td class="set-num">87</td> <td class="set-num">108</td> <td class="set-num">134</td> <td class="set-num">1,073</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/revenue-z.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Revenue</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="workspace">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Revenue</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="table">
					<div class="set-tools">
						<p>2025, in euros</p>
						<p class="set-count" role="status">12 products, Z to A</p>
					</div>

					<!-- The part that scrolls, both ways. It has a name and takes focus, so a keyboard can scroll it. -->
					<div class="shell-scroll set-region" role="region" aria-labelledby="revenue" tabindex="0">
						<table class="set-table">
							<caption class="set-hide" id="revenue">Revenue 2025 by product, in euros. The headers Product and Total sort it.</caption>
							<thead>
								<tr>
									<th scope="col" class="set-hold" aria-sort="descending">
										<a class="set-sort" href="revenue.html">
											Product
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
									<th scope="col" class="set-num">Jan</th> <th scope="col" class="set-num">Feb</th> <th scope="col" class="set-num">Mar</th> <th scope="col" class="set-num">Apr</th> <th scope="col" class="set-num">May</th> <th scope="col" class="set-num">Jun</th> <th scope="col" class="set-num">Jul</th> <th scope="col" class="set-num">Aug</th> <th scope="col" class="set-num">Sep</th> <th scope="col" class="set-num">Oct</th> <th scope="col" class="set-num">Nov</th> <th scope="col" class="set-num">Dec</th>
									<th scope="col" class="set-num">
										<a class="set-sort" href="revenue-by-total.html">
											Total
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<th scope="row" class="set-hold">Washi tape</th>
									<td class="set-num">107</td> <td class="set-num">96</td> <td class="set-num">120</td> <td class="set-num">122</td> <td class="set-num">136</td> <td class="set-num">122</td> <td class="set-num">109</td> <td class="set-num">149</td> <td class="set-num">165</td> <td class="set-num">147</td> <td class="set-num">161</td> <td class="set-num">200</td> <td class="set-num">1,634</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Sketchbook</th>
									<td class="set-num">592</td> <td class="set-num">608</td> <td class="set-num">667</td> <td class="set-num">766</td> <td class="set-num">760</td> <td class="set-num">679</td> <td class="set-num">686</td> <td class="set-num">830</td> <td class="set-num">1,037</td> <td class="set-num">821</td> <td class="set-num">895</td> <td class="set-num">1,262</td> <td class="set-num">9,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ruler, 30 cm</th>
									<td class="set-num">71</td> <td class="set-num">65</td> <td class="set-num">80</td> <td class="set-num">82</td> <td class="set-num">81</td> <td class="set-num">82</td> <td class="set-num">73</td> <td class="set-num">100</td> <td class="set-num">110</td> <td class="set-num">87</td> <td class="set-num">108</td> <td class="set-num">134</td> <td class="set-num">1,073</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Postcards</th>
									<td class="set-num">192</td> <td class="set-num">197</td> <td class="set-num">216</td> <td class="set-num">219</td> <td class="set-num">246</td> <td class="set-num">220</td> <td class="set-num">222</td> <td class="set-num">269</td> <td class="set-num">296</td> <td class="set-num">266</td> <td class="set-num">290</td> <td class="set-num">408</td> <td class="set-num">3,041</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Planner</th>
									<td class="set-num">2,686</td> <td class="set-num">2,434</td> <td class="set-num">2,668</td> <td class="set-num">3,070</td> <td class="set-num">3,042</td> <td class="set-num">3,079</td> <td class="set-num">2,746</td> <td class="set-num">3,320</td> <td class="set-num">4,157</td> <td class="set-num">3,285</td> <td class="set-num">4,062</td> <td class="set-num">5,054</td> <td class="set-num">39,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Pencil set</th>
									<td class="set-num">443</td> <td class="set-num">400</td> <td class="set-num">498</td> <td class="set-num">505</td> <td class="set-num">567</td> <td class="set-num">508</td> <td class="set-num">451</td> <td class="set-num">620</td> <td class="set-num">684</td> <td class="set-num">612</td> <td class="set-num">670</td> <td class="set-num">831</td> <td class="set-num">6,789</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A5</th>
									<td class="set-num">1,433</td> <td class="set-num">1,471</td> <td class="set-num">1,615</td> <td class="set-num">1,855</td> <td class="set-num">1,840</td> <td class="set-num">1,643</td> <td class="set-num">1,660</td> <td class="set-num">2,009</td> <td class="set-num">2,512</td> <td class="set-num">1,987</td> <td class="set-num">2,168</td> <td class="set-num">3,055</td> <td class="set-num">23,248</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A4</th>
									<td class="set-num">1,059</td> <td class="set-num">958</td> <td class="set-num">1,191</td> <td class="set-num">1,210</td> <td class="set-num">1,197</td> <td class="set-num">1,214</td> <td class="set-num">1,081</td> <td class="set-num">1,482</td> <td class="set-num">1,638</td> <td class="set-num">1,293</td> <td class="set-num">1,601</td> <td class="set-num">1,990</td> <td class="set-num">15,914</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ink, black</th>
									<td class="set-num">248</td> <td class="set-num">254</td> <td class="set-num">279</td> <td class="set-num">283</td> <td class="set-num">318</td> <td class="set-num">284</td> <td class="set-num">286</td> <td class="set-num">347</td> <td class="set-num">383</td> <td class="set-num">343</td> <td class="set-num">375</td> <td class="set-num">527</td> <td class="set-num">3,927</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Fountain pen</th>
									<td class="set-num">2,049</td> <td class="set-num">1,856</td> <td class="set-num">2,035</td> <td class="set-num">2,342</td> <td class="set-num">2,320</td> <td class="set-num">2,349</td> <td class="set-num">2,094</td> <td class="set-num">2,532</td> <td class="set-num">3,171</td> <td class="set-num">2,506</td> <td class="set-num">3,099</td> <td class="set-num">3,856</td> <td class="set-num">30,209</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Envelopes C6</th>
									<td class="set-num">78</td> <td class="set-num">70</td> <td class="set-num">88</td> <td class="set-num">89</td> <td class="set-num">100</td> <td class="set-num">89</td> <td class="set-num">79</td> <td class="set-num">109</td> <td class="set-num">120</td> <td class="set-num">108</td> <td class="set-num">118</td> <td class="set-num">146</td> <td class="set-num">1,194</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Desk pad</th>
									<td class="set-num">327</td> <td class="set-num">336</td> <td class="set-num">369</td> <td class="set-num">423</td> <td class="set-num">420</td> <td class="set-num">375</td> <td class="set-num">379</td> <td class="set-num">459</td> <td class="set-num">573</td> <td class="set-num">454</td> <td class="set-num">495</td> <td class="set-num">697</td> <td class="set-num">5,307</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/revenue.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Revenue</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="workspace">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Revenue</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="table">
					<div class="set-tools">
						<p>2025, in euros</p>
						<p class="set-count" role="status">12 products, A to Z</p>
					</div>

					<!-- The part that scrolls, both ways. It has a name and takes focus, so a keyboard can scroll it. -->
					<div class="shell-scroll set-region" role="region" aria-labelledby="revenue" tabindex="0">
						<table class="set-table">
							<caption class="set-hide" id="revenue">Revenue 2025 by product, in euros. The headers Product and Total sort it.</caption>
							<thead>
								<tr>
									<th scope="col" class="set-hold" aria-sort="ascending">
										<a class="set-sort" href="revenue-z.html">
											Product
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
									<th scope="col" class="set-num">Jan</th> <th scope="col" class="set-num">Feb</th> <th scope="col" class="set-num">Mar</th> <th scope="col" class="set-num">Apr</th> <th scope="col" class="set-num">May</th> <th scope="col" class="set-num">Jun</th> <th scope="col" class="set-num">Jul</th> <th scope="col" class="set-num">Aug</th> <th scope="col" class="set-num">Sep</th> <th scope="col" class="set-num">Oct</th> <th scope="col" class="set-num">Nov</th> <th scope="col" class="set-num">Dec</th>
									<th scope="col" class="set-num">
										<a class="set-sort" href="revenue-by-total.html">
											Total
											<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M6.5 13.5L12 19l5.5-5.5" /></svg>
										</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<th scope="row" class="set-hold">Desk pad</th>
									<td class="set-num">327</td> <td class="set-num">336</td> <td class="set-num">369</td> <td class="set-num">423</td> <td class="set-num">420</td> <td class="set-num">375</td> <td class="set-num">379</td> <td class="set-num">459</td> <td class="set-num">573</td> <td class="set-num">454</td> <td class="set-num">495</td> <td class="set-num">697</td> <td class="set-num">5,307</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Envelopes C6</th>
									<td class="set-num">78</td> <td class="set-num">70</td> <td class="set-num">88</td> <td class="set-num">89</td> <td class="set-num">100</td> <td class="set-num">89</td> <td class="set-num">79</td> <td class="set-num">109</td> <td class="set-num">120</td> <td class="set-num">108</td> <td class="set-num">118</td> <td class="set-num">146</td> <td class="set-num">1,194</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Fountain pen</th>
									<td class="set-num">2,049</td> <td class="set-num">1,856</td> <td class="set-num">2,035</td> <td class="set-num">2,342</td> <td class="set-num">2,320</td> <td class="set-num">2,349</td> <td class="set-num">2,094</td> <td class="set-num">2,532</td> <td class="set-num">3,171</td> <td class="set-num">2,506</td> <td class="set-num">3,099</td> <td class="set-num">3,856</td> <td class="set-num">30,209</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ink, black</th>
									<td class="set-num">248</td> <td class="set-num">254</td> <td class="set-num">279</td> <td class="set-num">283</td> <td class="set-num">318</td> <td class="set-num">284</td> <td class="set-num">286</td> <td class="set-num">347</td> <td class="set-num">383</td> <td class="set-num">343</td> <td class="set-num">375</td> <td class="set-num">527</td> <td class="set-num">3,927</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A4</th>
									<td class="set-num">1,059</td> <td class="set-num">958</td> <td class="set-num">1,191</td> <td class="set-num">1,210</td> <td class="set-num">1,197</td> <td class="set-num">1,214</td> <td class="set-num">1,081</td> <td class="set-num">1,482</td> <td class="set-num">1,638</td> <td class="set-num">1,293</td> <td class="set-num">1,601</td> <td class="set-num">1,990</td> <td class="set-num">15,914</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Notebook A5</th>
									<td class="set-num">1,433</td> <td class="set-num">1,471</td> <td class="set-num">1,615</td> <td class="set-num">1,855</td> <td class="set-num">1,840</td> <td class="set-num">1,643</td> <td class="set-num">1,660</td> <td class="set-num">2,009</td> <td class="set-num">2,512</td> <td class="set-num">1,987</td> <td class="set-num">2,168</td> <td class="set-num">3,055</td> <td class="set-num">23,248</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Pencil set</th>
									<td class="set-num">443</td> <td class="set-num">400</td> <td class="set-num">498</td> <td class="set-num">505</td> <td class="set-num">567</td> <td class="set-num">508</td> <td class="set-num">451</td> <td class="set-num">620</td> <td class="set-num">684</td> <td class="set-num">612</td> <td class="set-num">670</td> <td class="set-num">831</td> <td class="set-num">6,789</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Planner</th>
									<td class="set-num">2,686</td> <td class="set-num">2,434</td> <td class="set-num">2,668</td> <td class="set-num">3,070</td> <td class="set-num">3,042</td> <td class="set-num">3,079</td> <td class="set-num">2,746</td> <td class="set-num">3,320</td> <td class="set-num">4,157</td> <td class="set-num">3,285</td> <td class="set-num">4,062</td> <td class="set-num">5,054</td> <td class="set-num">39,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Postcards</th>
									<td class="set-num">192</td> <td class="set-num">197</td> <td class="set-num">216</td> <td class="set-num">219</td> <td class="set-num">246</td> <td class="set-num">220</td> <td class="set-num">222</td> <td class="set-num">269</td> <td class="set-num">296</td> <td class="set-num">266</td> <td class="set-num">290</td> <td class="set-num">408</td> <td class="set-num">3,041</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Ruler, 30 cm</th>
									<td class="set-num">71</td> <td class="set-num">65</td> <td class="set-num">80</td> <td class="set-num">82</td> <td class="set-num">81</td> <td class="set-num">82</td> <td class="set-num">73</td> <td class="set-num">100</td> <td class="set-num">110</td> <td class="set-num">87</td> <td class="set-num">108</td> <td class="set-num">134</td> <td class="set-num">1,073</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Sketchbook</th>
									<td class="set-num">592</td> <td class="set-num">608</td> <td class="set-num">667</td> <td class="set-num">766</td> <td class="set-num">760</td> <td class="set-num">679</td> <td class="set-num">686</td> <td class="set-num">830</td> <td class="set-num">1,037</td> <td class="set-num">821</td> <td class="set-num">895</td> <td class="set-num">1,262</td> <td class="set-num">9,603</td>
								</tr>
								<tr>
									<th scope="row" class="set-hold">Washi tape</th>
									<td class="set-num">107</td> <td class="set-num">96</td> <td class="set-num">120</td> <td class="set-num">122</td> <td class="set-num">136</td> <td class="set-num">122</td> <td class="set-num">109</td> <td class="set-num">149</td> <td class="set-num">165</td> <td class="set-num">147</td> <td class="set-num">161</td> <td class="set-num">200</td> <td class="set-num">1,634</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>
assets/select.js Show
// select.js: choosing several rows of a set to act on them at once.
//
// Without it every row's checkbox works, the bar of acts appears with the first row chosen
// (`:has()` in lists-and-tables.css), and Clear empties the choice (a reset button in the form).
// This adds the three things that need a script:
//
//   <input type="checkbox" data-set-all />      all rows on this page; mixed while only some are
//   <output data-set-count="{n} selected" />    how many are chosen; {n} is the number
//   Shift and a click                           every row from the last one clicked to this one
//
// Both parts are `hidden` in the markup and shown here, so nothing stands there dead when the
// script hasn't run. In a framework this is state of the component, or of a headless table
// library: keep the markup and the stylesheet, and leave this file out.

/** The last row's checkbox that was clicked: where a Shift-click starts from. */
let last = null;

const rows = (set) => [...set.querySelectorAll('input[data-set-row]')];

function show(set) {
	const boxes = rows(set);
	const chosen = boxes.filter((box) => box.checked).length;

	const all = set.querySelector('input[data-set-all]');
	if (all) {
		all.closest('[hidden]')?.removeAttribute('hidden');
		all.checked = chosen > 0 && chosen === boxes.length;
		// mixed exists only as a property: there is no attribute for it
		all.indeterminate = chosen > 0 && chosen < boxes.length;
	}

	const count = set.querySelector('[data-set-count]');
	if (count) {
		count.hidden = false;
		count.textContent = (count.dataset.setCount ?? '{n}').replace('{n}', String(chosen));
	}
}

document.addEventListener('click', (event) => {
	const box = event.target instanceof HTMLInputElement && event.target.matches('[data-set-row]') ? event.target : null;
	if (!box) return;
	const set = box.closest('.set');
	if (set && event.shiftKey && last && last !== box && set.contains(last)) {
		const boxes = rows(set);
		const [from, to] = [boxes.indexOf(last), boxes.indexOf(box)].sort((a, b) => a - b);
		// the rows between take the state this click gave its own row
		for (const between of boxes.slice(from, to + 1)) between.checked = box.checked;
	}
	last = box;
});

document.addEventListener('change', (event) => {
	const box = event.target;
	if (!(box instanceof HTMLInputElement)) return;
	const set = box.closest('.set');
	if (!set || !box.matches('[data-set-all], [data-set-row]')) return;
	if (box.matches('[data-set-all]')) for (const row of rows(set)) row.checked = box.checked;
	show(set);
});

// Clear: the form empties its checkboxes after this event, so count once it has.
document.addEventListener('reset', (event) => {
	const form = event.target;
	if (!(form instanceof HTMLFormElement)) return;
	const sets = form.matches('.set') ? [form] : [...form.querySelectorAll('.set')];
	setTimeout(() => sets.forEach(show));
});

for (const set of document.querySelectorAll('.set')) {
	if (set.querySelector('input[data-set-row]')) show(set);
}
assets/task.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>A task · Tasks</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="app-navigation.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html" aria-current="true">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<a class="shell-back" href="index.html" aria-label="Back to Tasks">
					<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.5 6l-6 6 6 6" /></svg>
					<span>Tasks</span>
				</a>
				<h1 class="shell-title">A task</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="shell-page">
					<p>Every row of the list leads here in this example.</p>
					<p>What the page of one thing holds is a pattern of its own.</p>
				</div>
			</main>
		</div>
	</body>
</html>
assets/tasks-overdue.html Show
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
		<title>Overdue · Tasks</title>
		<link rel="stylesheet" href="app-shell.css" />
		<link rel="stylesheet" href="lists-and-tables.css" />
	</head>
	<body>
		<a class="shell-skip" href="#content">Skip to content</a>

		<div class="shell" data-shell="page">
			<nav class="shell-nav" aria-label="Main">
				<ul class="shell-places">
					<li>
						<a href="index.html" aria-current="page">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>
							<span>Tasks</span>
						</a>
					</li>
					<li>
						<a href="invoices.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 4h10v16l-2.5-1.5L12 20l-2.5-1.5L7 20z" /><path d="M10 9h4M10 13h4" /></svg>
							<span>Invoices</span>
						</a>
					</li>
					<li>
						<a href="revenue.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M6 19v-8M12 19V5M18 19v-6" /></svg>
							<span>Revenue</span>
						</a>
					</li>
					<li>
						<a href="archive.html">
							<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 7h16v3H4zM6 10v9h12v-9M10 14h4" /></svg>
							<span>Archive</span>
						</a>
					</li>
				</ul>
			</nav>

			<header class="shell-bar">
				<h1 class="shell-title">Tasks</h1>
			</header>

			<main class="shell-content" id="content" tabindex="-1">
				<div class="set" data-set="list">
					<div class="set-tools">
						<ul class="set-filter" aria-label="Show">
							<li><a href="index.html">All</a></li>
							<li><a href="tasks-overdue.html" aria-current="page">Overdue</a></li>
						</ul>
						<p class="set-count" role="status">0 of 8 tasks</p>
					</div>
					<div class="set-state">
						<h2>No tasks are overdue</h2>
						<p>This filter shows the tasks whose date has passed.</p>
						<a class="set-button" href="index.html">Show all tasks</a>
					</div>
				</div>
			</main>
		</div>
	</body>
</html>