shed
Guides / Styling with the kit
Guides

Styling with the kit

One optional stylesheet gives your app Shed's look: paper and ink colours, square controls, ruled tables and automatic dark mode.

View Markdown

Every Shed app can load the kit from its own address. It styles plain HTML elements, so a page with no classes at all already looks finished, and adds a few classes for the things team tools need most.

HTML
<link rel="stylesheet" href="/_shed/kit.css">

The kit is optional and MIT-licensed. Delete the line to start from a blank page, or load it and override anything you like.

What it styles for you

  • Text: headings in Archivo, a wide variable typeface, with code and numbers in IBM Plex Mono. Both fonts are served by Shed, so the page loads no third-party resources.
  • Buttons: square and inked, with the yellow signal colour on hover and focus. Disabled buttons fade out.
  • Inputs, selects and textareas: the same square style, with a thick yellow focus ring.
  • Labels: small uppercase monospace, with the field inside the <label> laid out underneath.
  • Links: underlined, with a yellow highlight on hover.
  • Dark mode: follows the visitor's system setting, with no work from you.

Classes

ClassUse it for
.sh-labelSmall uppercase metadata, such as "Signed in as" or a column header.
.sh-tapeA label-maker strip for names, roles and statuses. Add .is-signal for yellow or .is-ghost for an outline.
button.is-quietA secondary button: outlined instead of filled.
button.is-smallA compact button for rows and toolbars.
table.sh-ledgerA ruled table for lists of things. Add .num to cells with numbers to right-align them.
.sh-cmdA dark terminal block for commands people copy.
.sh-noteA grey notice strip. Add .is-bad for an error.
.sh-monoMonospace text, for addresses, counts and timestamps.
.sh-muteQuieter text.
.sh-rule, .sh-hairA heavy or a hairline rule.
A typical layout
<p class="sh-label">Standup · Tuesday</p>
<h1>What's everyone on?</h1>

<form>
  <label>Today <input name="today" required></label>
  <button>Post</button>
  <button type="button" class="is-quiet">Skip</button>
</form>

<table class="sh-ledger">
  <thead><tr><th>Who</th><th>Status</th><th class="num">Points</th></tr></thead>
  <tbody>
    <tr><td>ana@example.com</td><td><span class="sh-tape is-signal">Blocked</span></td><td class="num">3</td></tr>
    <tr><td>sam@example.com</td><td><span class="sh-tape is-ghost">On track</span></td><td class="num">5</td></tr>
  </tbody>
</table>

<p class="sh-note is-bad">Couldn't save. Check your connection.</p>

Colours and fonts

The kit's design tokens are CSS custom properties on :root, and each has a dark-mode value. Use them in your own styles, so your additions match and switch to dark mode with everything else.

TokenLightUse
--paper#f4f4f0Page background.
--paper-2#e6e6e0Raised areas: code, notes, hover.
--ink#15140fText, rules, filled buttons.
--ink-2#47443bSecondary text.
--mute#7a766bLabels and metadata.
--hair15% inkHairline borders.
--signal#f2c200Hover, focus and the one thing that matters most. Use it sparingly.
--stop#c2331bErrors and destructive actions.
--go#2c6e3fSuccess.
--sans, --monoArchivo and Plex Mono, with system fallbacks.
CSS
.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 16px;
}
.card.is-done { border-color: var(--go) }
.card time { font: 500 12px/1 var(--mono); color: var(--mute) }

Light and dark

The kit follows the system setting with no code from you: light, or dark when someone's computer is in dark mode. To pin one, set data-theme on the <html> element:

HTML
<html lang="en" data-theme="dark">

To let people choose, flip the attribute and remember it. Remove it to go back to following the system.

JavaScript
const pick = (t) => {
  if (t === 'auto') delete document.documentElement.dataset.theme;
  else document.documentElement.dataset.theme = t;
  localStorage.setItem('theme', t);
};
pick(localStorage.getItem('theme') || 'auto');

Shed's own pages work this way: the Auto / Light / Dark button at the top right of every page.

Override anything

The kit uses plain selectors with low specificity, so your own rules win when they come after it. To change the accent colour for one app:

HTML
<link rel="stylesheet" href="/_shed/kit.css">
<style>
  :root { --signal: #6ad1ff }
</style>

↑↓ to move, Enter to open