app-navigation
The way between screens: an address for each, Back, and a list beside its detail.
When an agent loads it
Builds the way between an app's screens: an address for every screen, Back that leads to the parent, a list beside the thing chosen from it on a wide window and one at a time on a phone, and where a person lands after each step. Ships tested base CSS, a small script and working examples to copy. Use when adding pages, a detail view, a list with its details, tabs within a page, Back or a path to an app; when Back leaves the app or does nothing, a reload loses the open item, a link can't be opened in a new tab, a list forgets its place, or two panes are squeezed onto a phone.
The base code, running
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 app-navigation 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.
Clone the repository:
git clone https://github.com/simon-lund/skills.gitCopy the skill's folder to where your agent reads skills. For Claude Code:
cp -r skills/skills/app-navigation ~/.claude/skills/The folder holds 12 files:
SKILL.md,assets/app-navigation.css,assets/app-shell.css,assets/back.js,assets/example.css,assets/index.html,assets/message-1.html,assets/message-2.html,assets/message-3.html,assets/settings-notifications.html,assets/settings.html,references/traps.md.
Why it exists
A person moves through an app in three ways: into something, back out of it, across to another place. Each has a settled answer. An agent that derives it anew breaks what a quick look never tests: a reload, the browser's Back, a link opened in a new tab, a phone.
This skill decides three things first: the map of screens with an address for each, whether a step goes into a page or beside a list, and what a change does to the history. Then it copies a base that is tested at phone and desktop width.
Where it came from
It is the second of the patterns I asked for on 12 November 2026, after the frame. Its rules had been found one at a time before that:
- 30 October 2026: a first-run flow had no Back. Back belongs on every step.
- October 2026: Back says where it goes, a chevron and the parent's name. On a phone that looked wrong, so there it is a key with the chevron alone.
- 1 November 2026: Back and the title belong in one row, with the page's actions at its end.
The manifest already had the rule for two panes: never squeeze the regular layout into a column.
Don't squeeze the desktop's two panes into a phone. Neither has room to be read.
Do show one at a time. The chosen thing takes the screen, and Back leads to the list.
The rules behind it
Do give every layer a visible way out. A gesture is never the only way. (Nielsen: user control and freedom.)
Don't put a control next to Back that only does what Back does.
Don't add a screen per idea. Point at the place that already exists.
Regular: tablets and up. Tablet portrait goes with regular, as two panes.
Do use the platform's patterns before inventing one. A pattern of my own needs a written reason. (Jakob's law: people expect your product to work like the ones they already know.)
How to tell it works
- Before any markup it writes the map: the places, what is under each, the address of each.
- Reload any screen and you are where you were.
- Open a page two levels down directly, and Back in the bar still leads to its parent.
- On a phone a list and its detail show one at a time; on a wide window side by side.
- It names what it could not check in a desktop browser: the back gestures of a phone.
The skill
App navigation: the way between screens
A person moves through an app in three ways: into something, back out of it, across to another place. Each has a settled answer, in Android's navigation principles, in Apple's and Material's bars and split views, and in the browser's own history. An agent that derives it anew breaks what a quick look never tests: a reload, the browser's Back, a link opened in a new tab, a phone.
So don't derive it. Decide three things, copy the base, and check it running. Write each answer down.
This skill stands on app-shell, the frame. Build that first. Its stylesheet is here too, as
assets/app-shell.css, so the examples run on their own.
1. Decide before any markup
The map
Write the app down as a tree. At the top the places (the row or column of the frame). Under each, what a person can go into. Beside every node, its address.
- Every screen someone could want to come back to has an address: a place, one thing's page, a tab within a page, a search with its filters. The test: reload, and you are where you were; send the address to someone, and they see what you saw.
- A thing shown over its list (a picture, a preview) is a screen like any other: it has an address, and Back closes it.
- Not an address: an open menu, a question that needs a yes, a half-typed field.
- Not a new screen for every idea. Before adding a node, look for the place that already holds it.
Into, or beside
For each step from a list or a page to one thing:
| A pushed page | A list beside its detail | |
|---|---|---|
| For | going into one thing and staying there: a project, a settings group | choosing among many and looking at each in turn: mail, tickets, files, conversations |
| Regular | the page takes the content's place; Back, first in its bar, says where it leads | the list and the chosen thing side by side; no Back |
| Compact | the same page; Back is a key with a chevron | one at a time: the list, then the chosen thing with Back |
| Set | shell-back first in the bar |
data-shell="split" on the frame, shell-split in the content |
What a change does to the history
- A new entry for what a person takes for a new view: another page, another thing, a filter or a sort order applied, a search sent off. Back undoes it.
- The same entry, changed for what happens inside a view: each letter of a search while it is typed, more rows loaded, a section opened.
- Both are in the address. The difference is only what Back does. In doubt, ask what a person expects to see after Back, and make that the entry before this one.
2. Copy the base
assets/app-navigation.css: Back, and the list beside its detail. Load it afterassets/app-shell.css.assets/back.js: makes Back a real step back when the parent is the page you came from.assets/index.htmlwithmessage-1.htmltomessage-3.html: a list beside its detail.assets/settings.htmlwithsettings-notifications.html: a pushed page. Open them, at a phone's width and a desktop's.assets/example.cssis the examples' own rows and text. It is not part of the base.
The HTML files are what a router renders for each address. In an app:
- The list stays mounted while the chosen thing changes: a layout around the thing's route, not a part of its page. Then the list keeps its scroll position and its focus.
data-openon the split follows the address: set while something is chosen.- Back is a link to the parent. Where the router knows the page a person came from (SvelteKit:
frominafterNavigate), let it do whatback.jsdoes and leave the script out. Never both.
Keep every line marked TRAP. If one has to go, say which and why.
3. Two size classes
Shared: the addresses, where Back leads, the words.
- Compact. One pane. Back is a key of 44px with a chevron; its name for assistive tech says where it leads ("Back to Inbox").
- Regular. Back says where it leads in words, before the title, in one row with it. A list shows beside its detail once the content is 40rem wide. While nothing is chosen, the detail's pane says what will appear there.
- The two panes answer to the content's width, not the window's. Beside a sidebar the window is wide long before the content is. Between 600px and about 840px a list and its detail still show one at a time.
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.
- Every screen reloads to itself.
- Back in the bar leads to the parent, also for someone who arrived there directly.
- The browser's Back returns to where you were: the same scroll position, the same filters.
- A link is a link: it opens in a new tab and shows its address.
- A new page starts at its top, with its own title in the tab and focus at its start.
- A new view adds to the history; what happens inside a view doesn't.
- One pane on a phone, never two squeezed side by side, and never an empty detail.
- No Back where the list is in view.
- The list stays put when another thing is chosen, and marks the one that is open.
- The place stays marked on every page inside it.
- One title per screen: the thing when one is open, the place otherwise.
- Gone is a state: an address whose thing no longer exists says so inside the frame, with the way back.
- Back and the title share one row; the page's own actions sit at its end.
- The same places, in the same order, on every screen.
5. Check it running
For every screen, not only the first:
- Reload it. Open its address in a new window. Use the browser's Back and Forward through a path of several steps, and watch the scroll position.
- Arrive directly at a page two levels down, then use Back in the bar.
- Widths: 375, 599, 600, 760 (one pane in a wide window), 1024, 1440. Drag the window across the point where the second pane appears while something is open: it stays open.
- Keyboard only: follow a link, see where focus is, and reach Back.
- What a desktop browser can't show: the swipe from the edge on iOS and Android's back gesture. Check them on a device, or say that they are unchecked.
6. Report
- The map: places, what is under each, the address of each.
- For each step into something: pushed page or list beside detail, and why.
- What changes the history and what only the address.
- The traps that failed and what was fixed.
- What is unchecked, and what only the user can decide.
references/traps.md Show Close
The traps on the way between screens
The fourteen checks of SKILL.md, each with what you see when it's wrong, why it happens, the fix and where the rule comes from. Read the entry of a check that failed, or all of them before building navigation into an app with a client-side router.
1. Every screen reloads to itself
- You see: a reload throws you back to the start. A thing you had open is closed, the tab you were on is the first one again, the search is empty.
- Why: what is open lives only in memory: a variable, a store, a component's state.
- Fix: put it in the address. The thing in the path (
/inbox/42), the adjustments in the query (?tab=sent&q=invoice). The page is built from the address, so a reload, a bookmark and a link someone was sent all open the same screen. - Test: copy the address of every screen into a new window.
2. Back in the bar leads to the parent
- You see: someone opens a link to a page deep in the app. Back in the bar does nothing, or leaves the app for the site they came from.
- Why: Back was built as
history.back(). That steps to whatever was before, and for someone who arrived directly, that is not the parent. - Fix: Back is a link to the parent:
<a class="shell-back" href="/inbox">. It always has somewhere to go.assets/back.jsthen improves the common case: when the entry before this one is that same parent, it steps back instead of adding the parent a second time. It asks the Navigation API (Chrome 102, Firefox 147, Safari 26.2); in an older browser the link is followed as written. - Source: Android, "Principles of navigation": "Up and Back are identical within your app's task", "The Up button never exits your app", "Deep linking simulates manual navigation".
3. The browser's Back returns to where you were
- You see: after looking at one thing and going back, the list is at its top again, its filter is gone, or the next page of results has to be loaded again.
- Why: three different causes.
- The list was rebuilt at its top. A browser restores the scroll position of a page it steps back to; a client-side router has to do the same, and has to wait until the list is there.
- The filter lived in memory and not in the address (trap 1).
- The list had loaded more rows as you scrolled, and only the first batch came back.
- Fix: adjustments in the address. Let the router restore the scroll position, and check that it does so for a list that loads in batches: keep what was loaded, or its extent, with the history entry (SvelteKit: a snapshot). Prefer a page (the document scrolls) for a plain list: its position is the one every browser restores.
- Source: HTML Standard, "Persisted history entry state": a browser should restore an entry's scroll positions when stepping back to it. Jakob Nielsen, "The Top 10 Web Design Mistakes of 1999", item 1, "Breaking or Slowing Down the Back Button". Baymard Institute, Christian Holst, "4 Design Patterns That Violate 'Back' Button UX Expectations" (2020): returning from a product to its list is one of the four.
4. A link is a link
- You see: a row or a card can be clicked, but not opened in a new tab, not copied as a link, and a hover shows no address. Keyboard users can't reach it, or reach it and can't follow it.
- Why: it is a
divor abuttonwith a click handler that calls the router. - Fix: what goes somewhere is
<a href>, with the real address. A router can still take over the click. A button is for doing something on this page. - Source: HTML Standard, the
aelement.
5. A new page starts at its top
You see: after following a link the new page is scrolled halfway down, where the old one was. The tab still shows the old title. A screen reader says nothing, and Tab continues from a link that no longer exists.
Why: a full page load resets all of this by itself. A client-side navigation swaps part of the page and resets none of it, unless the router does.
Fix: on every navigation: the scroll position goes to the top (or to the
#fragment), the document's title changes to name the new screen first ("Notifications · Settings · Mail"), and focus moves to the start of the new content. Check what the router does by itself before adding code:Router, as documented in November 2026 New page Back Focus Announces SvelteKit 3 top, or the #fragmentposition restored the body, or an autofocuselementthe new title React Router 8 with <ScrollRestoration>with <ScrollRestoration>not handled not handled Next.js 16, App Router top of the new page position kept left where it was the title, else the h1Source: WCAG 2.2, 2.4.2 Page Titled (level A), with technique G88, and 2.4.3 Focus Order (level A). W3C WAI, curriculum module "Rich Applications" (informative): when a single-page app shows a new screen, place focus at the start of its content, as a page load would. Marcy Sutton with Fable Tech Labs, "What we learned from user testing of accessible client-side routing techniques" (2019). The routers' own documentation: SvelteKit "Accessibility" and "Link options", React Router "Accessibility" and
ScrollRestoration, Next.js "Accessibility" andLink.
6. A new view adds to the history; what happens inside a view doesn't
- You see: after typing a search, Back has to be pressed once per letter. Or the opposite: a filter was applied, and Back leaves the list altogether instead of taking the filter off.
- Why: every change was pushed as a new entry, or none was.
- Fix: a new entry (
pushState, a followed link) for what a person takes for a new view: another page, another thing, a filter or a sort order applied, a search sent off, a thing opened over its list. The current entry changed in place (replaceState) for what happens inside a view: each letter while a search is typed, more rows loaded, a section opened. Both kinds end up in the address. After Back, the screen shows the state it restored: the filter's control too, not only the rows. - Source: Baymard Institute, Christian Holst, "4 Design Patterns That Violate 'Back' Button
UX Expectations" (2020): people take a filtered or sorted list for a new view and expect Back
to undo it, and expect Back to close an overlay; 59% of the sites tested broke at least one of
the four expectations. MDN, History API,
pushState()andreplaceState().
7. One pane on a phone
- You see: on a phone the list and the chosen thing sit side by side, each too narrow to read. Or the phone opens on an empty pane that says "Choose something".
- Why: the desktop's layout was kept and made narrower.
- Fix: below the width where both fit, one pane shows: the list while nothing is chosen, the
chosen thing once something is.
assets/app-navigation.cssdoes it from one attribute,data-openon the split. The placeholder for "nothing chosen" exists only where both panes show. - Source: Material 3, list-detail: one pane at compact width, one (recommended) or two at
medium, two from 840dp. Apple, SwiftUI
NavigationSplitView: in a narrow size it collapses its columns into a single stack; the Human Interface Guidelines prefer a split view in a regular, not a compact, environment. Microsoft, Windows "List/details": stacked up to 640 effective pixels, side by side from 641.
8. No Back where the list is in view
- You see: a wide window shows the list and the chosen thing, and above the thing a Back arrow that closes it. It does what a click on the list already does, and it leaves an empty pane.
- Fix: Back belongs to the single pane. The base hides it once both panes show.
- Source: Material 3, list-detail, "Single vs two-pane": the detail has a back button only in a single-pane layout.
9. The list stays put
- You see: choosing another row makes the list jump to its top, or the open row isn't marked, so nobody can tell which one is shown beside it.
- Why: the list is part of the chosen thing's page, so it is built again with every choice.
- Fix: the list belongs to a layout around the thing's route and stays mounted. The row that
is open carries
aria-current="page", because its link leads to the page that is shown, and the mark hangs on that attribute. - Source: WAI-ARIA 1.2,
aria-current:pageis the current page within a set of pages. Material 3, list-detail: the list shows a selected state only in a two-pane layout.
10. The place stays marked
- You see: on a page inside Settings, nothing in the row or column of places is marked.
- Why: the mark was tied to an exact match of the address.
- Fix: the place is marked on its own page and on every page inside it:
aria-current="page"on its own page,aria-current="true"inside it.assets/app-shell.cssstyles both alike. A place's link always leads to the place's first screen, also from a page inside it. - Source: WAI-ARIA 1.2,
aria-current:trueis the current item within a set. The specification has no example of a section that holds the current page;trueis the value that fits, since the link doesn't lead to the current page itself. Apple, UIKitUITabBarController: a tap on a tab shows that tab's root view, also when it was selected.
11. One title per screen
- You see: two headings of the first level, or the same words twice: "Inbox" in the bar and again above the list.
- Fix: the
h1is the thing when one is open and the place otherwise. Beside an open thing the list's heading is anh2. The document's title follows the same order: thing, place, app.
12. Gone is a state
- You see: an old link to something that was deleted shows a blank pane, a spinner that never ends, or the bare error page of the server, outside the app.
- Fix: inside the frame, in the place where the thing would be: that it no longer exists, and the way back to its list. The places stay usable around it.
13. Back and the title share one row
- You see: Back on a line of its own above a large title, or the page's actions scattered under the title.
- Fix: one bar: Back first, the title, the page's own actions at the end. On a phone Back is a key with a chevron; on a wider window it says where it leads, with the parent's name and never with the word "Back".
- Source: Material 3, app bars: a leading button (the back arrow), the headline, up to two trailing icon buttons. Apple Human Interface Guidelines, toolbars: the standard Back button, no text label that says Back, a title that confirms where you are and isn't the app's name. Nielsen Norman Group, Page Laubheimer, "Breadcrumbs: 11 Design Guidelines for Desktop and Mobile" (2018): a path shows the hierarchy, not where you have been, and on a phone it may be only the link to the parent.
14. The same places, in the same order
- You see: a place is missing on some screens, or the places change order between screens.
- Fix: the row or column of places is the same on every screen that has the frame.
- Source: WCAG 2.2, 3.2.3 Consistent Navigation (level AA).
assets/app-navigation.css Show Close
/*
* 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 Close
/* 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/back.js Show Close
// Back that goes back.
//
// Back in a bar is a link to the parent, so it works for someone who arrived here directly: from
// a shared link, a bookmark, a reload. But when the parent is also the page you just came from,
// following the link would add a third entry to the history (list, item, list again) and open
// the list at its top. Then a real step back is better: it returns to the list where you left it.
//
// This asks the browser's Navigation API whether the entry before this one is the link's own
// address. Where the API is missing, or the answer is no, the link is followed as written.
// Load it on pages that have a .shell-back: <script src="back.js" defer></script>
document.addEventListener('click', (event) => {
const link = event.target instanceof Element ? event.target.closest('a.shell-back') : null;
// a click that means "open elsewhere" (a modifier key, another button) is left alone
if (!link || event.defaultPrevented || event.button !== 0) return;
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
const history = window.navigation;
if (!history?.canGoBack || !history.currentEntry) return;
const before = history.entries()[history.currentEntry.index - 1];
if (!before?.url || !samePage(before.url, link.href)) return;
event.preventDefault();
history.back();
});
/** The same address, whatever the #fragment. */
function samePage(a, b) {
const [left, right] = [new URL(a), new URL(b)];
return left.origin === right.origin && left.pathname === right.pathname && left.search === right.search;
}
assets/example.css Show Close
/* The examples' own content: rows and a message. Not part of the base. */
.rows {
margin: 0;
padding: 0.5rem;
list-style: none;
}
/* the row's text starts on the same edge as the title above it */
.rows a {
display: flex;
flex-direction: column;
justify-content: center;
min-height: 3.5rem;
padding: 0.5rem calc(var(--shell-gutter) - 0.5rem);
border-radius: 0.5rem;
color: inherit;
text-decoration: none;
}
.rows .name {
overflow: hidden;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
}
.rows .from,
.shell-page .from {
color: var(--shell-muted);
font-size: 0.875rem;
}
.shell-page .from {
margin: 0 0 1rem;
}
@media (hover: hover) {
.rows a:hover {
background: var(--shell-current);
}
}
assets/index.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Inbox · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.css" />
</head>
<body>
<a class="shell-skip" href="#content">Skip to content</a>
<div class="shell" data-shell="split">
<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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<main class="shell-content" id="content" tabindex="-1">
<div class="shell-split">
<section class="shell-pane" data-pane="list" aria-labelledby="list-title">
<header class="shell-bar">
<h1 class="shell-title" id="list-title">Inbox</h1>
</header>
<ul class="shell-scroll rows">
<li>
<a href="message-1.html">
<span class="name">Lunch on Friday?</span>
<span class="from">Anna</span>
</a>
</li>
<li>
<a href="message-2.html">
<span class="name">Your invoice for October</span>
<span class="from">Billing</span>
</a>
</li>
<li>
<a href="message-3.html">
<span class="name">Welcome</span>
<span class="from">The team</span>
</a>
</li>
</ul>
</section>
<section class="shell-pane" data-pane="detail" aria-label="Message">
<p class="shell-empty">Choose a message to read it here.</p>
</section>
</div>
</main>
</div>
</body>
</html>
assets/message-1.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Lunch on Friday? · Inbox · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.css" />
<script src="back.js" defer></script>
</head>
<body>
<a class="shell-skip" href="#content">Skip to content</a>
<div class="shell" data-shell="split">
<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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<main class="shell-content" id="content" tabindex="-1">
<div class="shell-split" data-open>
<section class="shell-pane" data-pane="list" aria-labelledby="list-title">
<header class="shell-bar">
<h2 class="shell-title" id="list-title">Inbox</h2>
</header>
<ul class="shell-scroll rows">
<li>
<a href="message-1.html" aria-current="page">
<span class="name">Lunch on Friday?</span>
<span class="from">Anna</span>
</a>
</li>
<li>
<a href="message-2.html">
<span class="name">Your invoice for October</span>
<span class="from">Billing</span>
</a>
</li>
<li>
<a href="message-3.html">
<span class="name">Welcome</span>
<span class="from">The team</span>
</a>
</li>
</ul>
</section>
<article class="shell-pane" data-pane="detail" aria-labelledby="message-title">
<header class="shell-bar">
<a class="shell-back" href="index.html" aria-label="Back to Inbox">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 6l-6 6 6 6" /></svg>
<span>Inbox</span>
</a>
<h1 class="shell-title" id="message-title">Lunch on Friday?</h1>
</header>
<div class="shell-scroll">
<div class="shell-page">
<p class="from">From Anna</p>
<p>Are you free on Friday? The place by the river has a table at half past twelve.</p>
<p>Say yes and I'll book it.</p>
</div>
</div>
</article>
</div>
</main>
</div>
</body>
</html>
assets/message-2.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Your invoice for October · Inbox · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.css" />
<script src="back.js" defer></script>
</head>
<body>
<a class="shell-skip" href="#content">Skip to content</a>
<div class="shell" data-shell="split">
<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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<main class="shell-content" id="content" tabindex="-1">
<div class="shell-split" data-open>
<section class="shell-pane" data-pane="list" aria-labelledby="list-title">
<header class="shell-bar">
<h2 class="shell-title" id="list-title">Inbox</h2>
</header>
<ul class="shell-scroll rows">
<li>
<a href="message-1.html">
<span class="name">Lunch on Friday?</span>
<span class="from">Anna</span>
</a>
</li>
<li>
<a href="message-2.html" aria-current="page">
<span class="name">Your invoice for October</span>
<span class="from">Billing</span>
</a>
</li>
<li>
<a href="message-3.html">
<span class="name">Welcome</span>
<span class="from">The team</span>
</a>
</li>
</ul>
</section>
<article class="shell-pane" data-pane="detail" aria-labelledby="message-title">
<header class="shell-bar">
<a class="shell-back" href="index.html" aria-label="Back to Inbox">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 6l-6 6 6 6" /></svg>
<span>Inbox</span>
</a>
<h1 class="shell-title" id="message-title">Your invoice for October</h1>
</header>
<div class="shell-scroll">
<div class="shell-page">
<p class="from">From Billing</p>
<p>Your invoice for October is ready. Nothing is due: it was paid from your balance.</p>
<p>This message is long on purpose. Scroll it, and the list beside it stays where it is.</p>
<p>Line 1 of the invoice.</p>
<p>Line 2 of the invoice.</p>
<p>Line 3 of the invoice.</p>
<p>Line 4 of the invoice.</p>
<p>Line 5 of the invoice.</p>
<p>Line 6 of the invoice.</p>
<p>Line 7 of the invoice.</p>
<p>Line 8 of the invoice.</p>
<p>Line 9 of the invoice.</p>
<p>Line 10 of the invoice.</p>
<p>Line 11 of the invoice.</p>
<p>Line 12 of the invoice.</p>
<p>Line 13 of the invoice.</p>
<p>Line 14 of the invoice.</p>
<p>Line 15 of the invoice.</p>
<p>Line 16 of the invoice.</p>
<p>Line 17 of the invoice.</p>
<p>Line 18 of the invoice.</p>
<p>Line 19 of the invoice.</p>
<p>Line 20 of the invoice.</p>
<p>Line 21 of the invoice.</p>
<p>Line 22 of the invoice.</p>
<p>Line 23 of the invoice.</p>
<p>Line 24 of the invoice.</p>
</div>
</div>
</article>
</div>
</main>
</div>
</body>
</html>
assets/message-3.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Welcome · Inbox · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.css" />
<script src="back.js" defer></script>
</head>
<body>
<a class="shell-skip" href="#content">Skip to content</a>
<div class="shell" data-shell="split">
<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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<main class="shell-content" id="content" tabindex="-1">
<div class="shell-split" data-open>
<section class="shell-pane" data-pane="list" aria-labelledby="list-title">
<header class="shell-bar">
<h2 class="shell-title" id="list-title">Inbox</h2>
</header>
<ul class="shell-scroll rows">
<li>
<a href="message-1.html">
<span class="name">Lunch on Friday?</span>
<span class="from">Anna</span>
</a>
</li>
<li>
<a href="message-2.html">
<span class="name">Your invoice for October</span>
<span class="from">Billing</span>
</a>
</li>
<li>
<a href="message-3.html" aria-current="page">
<span class="name">Welcome</span>
<span class="from">The team</span>
</a>
</li>
</ul>
</section>
<article class="shell-pane" data-pane="detail" aria-labelledby="message-title">
<header class="shell-bar">
<a class="shell-back" href="index.html" aria-label="Back to Inbox">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 6l-6 6 6 6" /></svg>
<span>Inbox</span>
</a>
<h1 class="shell-title" id="message-title">Welcome</h1>
</header>
<div class="shell-scroll">
<div class="shell-page">
<p class="from">From The team</p>
<p>This inbox shows one way between two screens: a list, and the message chosen from it.</p>
<p>On a wide window both are in view. On a phone you see one at a time, and Back leads to the list.</p>
</div>
</div>
</article>
</div>
</main>
</div>
</body>
</html>
assets/settings-notifications.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Notifications · Settings · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.css" />
<script src="back.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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.html" aria-current="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<header class="shell-bar">
<a class="shell-back" href="settings.html" aria-label="Back to Settings">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 6l-6 6 6 6" /></svg>
<span>Settings</span>
</a>
<h1 class="shell-title">Notifications</h1>
</header>
<main class="shell-content" id="content" tabindex="-1">
<div class="shell-page">
<p>
This is a page pushed onto Settings. Back, at the start of the bar, leads to Settings. It is a
link, so it also works when you open this address directly.
</p>
<p>
On a phone Back is a key with a chevron. On a wide window it says where it goes. Settings
stays marked in the places, because this page is inside it.
</p>
</div>
</main>
</div>
</body>
</html>
assets/settings.html Show Close
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Settings · Mail</title>
<link rel="stylesheet" href="app-shell.css" />
<link rel="stylesheet" href="app-navigation.css" />
<link rel="stylesheet" href="example.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-linejoin="round" aria-hidden="true"><path d="M12 5l7.5 13h-15z" /></svg>
<span>Inbox</span>
</a>
</li>
<li>
<a href="settings.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="M5 8h14M5 12h14M5 16h14" /></svg>
<span>Settings</span>
</a>
</li>
</ul>
</nav>
<header class="shell-bar">
<h1 class="shell-title">Settings</h1>
</header>
<main class="shell-content" id="content" tabindex="-1">
<ul class="rows">
<li>
<a href="settings-notifications.html">
<span class="name">Notifications</span>
<span class="from">What reaches you, and when</span>
</a>
</li>
</ul>
</main>
</div>
</body>
</html>