Standard · Version 1.0 · 2026-11-22

Template Interface Web Design Standard

How a page is checked before it ships: on a phone, on a desktop and on paper. It sets the widths to test, the order to test them in, the bugs that keep coming back, and what a clean printout looks like. Every check is rendered and measured, never judged by reading the code.

Standards: Color · Web design

1. The rules

Eight rules. A page that keeps all of them works on any screen, for keyboard and screen reader users, and on paper.

  1. Three surfaces, every page. Mobile, desktop and print are each designed and each checked. A page is not finished until all three pass.
  2. Evidence, not reading. Render the page and measure it. Reading CSS shows structure; only rendering shows layout. Report what you measured, and say what you did not check.
  3. No sideways scrolling from 320px up. Content reflows down to 320 CSS pixels with no horizontal page scroll, and nothing is clipped or overlapping. WCAG 1.4.10
  4. Every state is designed. Hover, focus, active, disabled, selected, error, empty, loading and success all have a deliberate look. Focus is always clearly visible. WCAG 2.4.7
  5. Works for everyone. Landmarks, headings in order, a name on every control, status messages in a live region, full keyboard use with no traps, targets at least 24 by 24 pixels (44 for main touch controls), and motion that stops under reduced motion. WCAG 2.1.1, 2.5.8, 4.1.2
  6. Color follows the Color Standard. Roles instead of raw colors, and both light and dark mode pass every required pairing. Color Standard
  7. Honest controls. A form or button with nothing behind it says so when used. Nothing that does not work is made to look as if it does.
  8. Prints clean and complete. Dark ink on white, without controls or decoration, with everything a reader would want on paper and nothing that will be out of date tomorrow. Section 4 sets out how.

2. Surfaces and widths

Check at every width below, not just the widest. Each one is there because a real defect showed up at or near it.

SurfaceCheck atWhy these
Mobile320px, 375px320 is the WCAG reflow width, and four overflow bugs once existed only at or below 375. Headless browsers clamp windows below about 500px, so set these widths through device emulation.
Tablet700px, 900pxWhere most layouts change their column count, and where cards and tables first get squeezed.
Desktop1023px, 1150px, 1440px, 1920pxEither side of the common 1024 and 1200 breakpoints, a typical laptop, and a wide screen where line length and empty space give a layout away.
PrintUS Letter (8.5 by 11 in), fitting A4Print preview or a saved PDF. Do not fix the paper size in CSS: A4 is narrower (8.27 in), so a page that fits A4 fits both.

The listed widths are samples, not a continuous range. One defect lived only between 761px and 1080px. After the fixed widths, drag the window slowly from narrow to wide and watch for anything that jumps or overflows.

3. The review method

Do these in order for every page. A fix is not finished until the page has been rendered and measured again.

  1. Screenshot every width in section 2, and look at every screenshot.
  2. Scroll the whole page at 1440px and at 375px. Most pages are taller than one screen, and the lower sections are where unfinished work hides.
  3. Measure overflow at each width: document.documentElement.scrollWidth must equal clientWidth. To find the cause, set a suspect element's width to min-content; the one whose minimum is wider than the viewport is the culprit.
  4. Use every control with real mouse and key events: hover, focus, active, disabled, keyboard use, and Escape closing menus and returning focus. Scroll a control into view before clicking it.
  5. Read the console. Zero errors from the page, using a fresh browser profile so extensions do not add noise.
  6. Measure contrast for every text and background pair and every meaningful border, in light and dark mode, against the Color Standard's required pairings.
  7. Print to PDF and read every page, following section 4.
  8. Fix, then repeat the steps the fix touched. Record the root cause by name (for example, "bare 1fr track in the tablet override"), not "fixed mobile bugs".

People print menus, recipes, documentation, receipts, tickets, hours and directions. The printout is a reading copy of the page: decide what is worth having on paper, and leave out everything else.

Leave out

  • Site and page navigation, theme switches and cookie banners.
  • Buttons, filters, tabs, forms and anything else that needs a click.
  • Live state that will go stale: "open now", "today", countdowns, stock levels.
  • Decorative illustrations, hero art and background effects.
  • Panels about the page rather than part of it.

Keep, and adjust

  • All the content, including what is hidden behind tabs, accordions or "show more" on screen.
  • Dark text on white, whatever mode the screen was in.
  • A heading for each block whose on-screen label was a control, such as a tab.
  • Contact details and addresses written out in full, and link URLs where the link is the information.
  • Maps and charts that carry information, sized to fit with room to spare.

Rules of thumb

Starting point

@media print {
  @page { margin: 0.5in; }

  /* Light, whatever the screen mode */
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --canvas: #ffffff;
    --text: #1f1912;
    --muted: #4a4036;
  }

  /* Controls, live state and decoration */
  .site-header, .filters, .tabs, .booking-form,
  .open-now, .hero-art { display: none !important; }

  /* Content hidden behind tabs prints too */
  .page .tab-panel[hidden] { display: block !important; }

  /* Header and footer on every page, drawn in the margins */
  @page {
    background: #ffffff;
    @top-left { content: "Site name"; }
    @top-right { content: "Phone or date"; }
    @bottom-left { content: "A short note."; }
    @bottom-right { content: "Page " counter(page) " of " counter(pages); }
  }

  /* The center title follows the section on that page */
  @page menu { @top-center { content: "Menu"; } }
  @page visit { @top-center { content: "Visit"; } }
  .menu { page: menu; }
  .visit { page: visit; }

  /* Keep units whole */
  .card, figure, tr { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}

Worked example: the restaurant template

The restaurant template had no print styles. Printed to Letter before and after adding them:

CheckBeforeAfter
Pages9, unnumbered6, each with a header titled for its section (Menu, The Kitchen, Visit and Book) and a "Page 1 of 6" footer
Menu courses printed1 of 5 (only the open tab)5 of 5, each under its own heading
ColorsDark theme; cream text on white paper once backgrounds are droppedInk on white
Live state"Open now until 4pm" and a "Today" badge, frozen on paperLeft out; the full weekly hours remain
Controls and artHeader, buttons, filters, booking form, two full-page illustrationsLeft out
Page splitsHours card split across two pagesEvery card, dish and table kept whole

5. Bugs that keep coming back

Each of these shipped at least once in this project, most of them in more than one place. Check for them by name.

Screen layout

  • Bare 1fr grid tracks. A 1fr track will not shrink below its content, so a wide table pushes the page wider. Write minmax(0, 1fr), in every media query that redefines the grid.
  • Flex items that will not shrink. A flex child's minimum width is its content width. Give it min-width: 0 so an inner scroll area can scroll.
  • overflow resetting overflow-x. The shorthand silently undoes an earlier overflow-x: auto.
  • gap plus margins. Children of a gap container should not also carry margins in that direction; the two add up.
  • display beating hidden. Any rule that sets display overrides the hidden attribute. Guard it with [hidden] { display: none !important; } and check hidden things by their rendered box.
  • Targets under a sticky header. In-page links and focused fields need scroll-margin-top at least the header's height.
  • Focus rings on the wrong surface. Measure the ring against what is directly behind it, which is not always the page background.
  • Opacity as de-emphasis. Lower opacity lowers contrast. Use a measured color instead, and show scroll-reveal content under reduced motion and in print.
  • var() in SVG attributes. fill="var(--x)" does not resolve. Use a CSS rule or currentColor.

Print

  • Hidden tab panels. Only the open tab prints. Show every panel and give each one a heading.
  • Dark mode on paper. Backgrounds are dropped, light text stays, and the page comes out unreadable.
  • Frozen live state. "Open now", "Today" and countdowns are wrong by the time anyone reads the paper.
  • Art filling pages. Hero illustrations and decorative frames each take most of a sheet.
  • Forced page breaks. A break-before: page on a short section leaves the page before it mostly empty.
  • Print rules that lose. Shared chrome styled as .panel.panel ignores a print rule written as .panel.

6. Tools

Everything here runs in headless Chrome or Edge, with no packages to install. Always use a scratch profile in the temp folder, and delete it afterwards.

# Screenshot at one width
chrome --headless=new --disable-gpu --no-first-run --disable-extensions \
  --user-data-dir=<temp>/profile --window-size=1440,1000 \
  --virtual-time-budget=2500 --screenshot=out.png "file:///<path>/index.html"

# Print to a Letter PDF
chrome --headless=new --disable-gpu --no-first-run --disable-extensions \
  --user-data-dir=<temp>/profile --no-pdf-header-footer \
  --virtual-time-budget=4000 --print-to-pdf=out.pdf "file:///<path>/index.html"

Things that make a check lie

7. Checklist before you ship

8. Sources and versions

Version 1.0, 2026-11-22. First release. Drawn from this project's template reviews and the print test on the restaurant template. Changes will be versioned here.