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.
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.
<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
| Class | Use it for |
|---|---|
.sh-label | Small uppercase metadata, such as "Signed in as" or a column header. |
.sh-tape | A label-maker strip for names, roles and statuses. Add .is-signal for yellow or .is-ghost for an outline. |
button.is-quiet | A secondary button: outlined instead of filled. |
button.is-small | A compact button for rows and toolbars. |
table.sh-ledger | A ruled table for lists of things. Add .num to cells with numbers to right-align them. |
.sh-cmd | A dark terminal block for commands people copy. |
.sh-note | A grey notice strip. Add .is-bad for an error. |
.sh-mono | Monospace text, for addresses, counts and timestamps. |
.sh-mute | Quieter text. |
.sh-rule, .sh-hair | A heavy or a hairline rule. |
<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.
| Token | Light | Use |
|---|---|---|
--paper | #f4f4f0 | Page background. |
--paper-2 | #e6e6e0 | Raised areas: code, notes, hover. |
--ink | #15140f | Text, rules, filled buttons. |
--ink-2 | #47443b | Secondary text. |
--mute | #7a766b | Labels and metadata. |
--hair | 15% ink | Hairline borders. |
--signal | #f2c200 | Hover, focus and the one thing that matters most. Use it sparingly. |
--stop | #c2331b | Errors and destructive actions. |
--go | #2c6e3f | Success. |
--sans, --mono | Archivo and Plex Mono, with system fallbacks. |
.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 lang="en" data-theme="dark">To let people choose, flip the attribute and remember it. Remove it to go back to following the system.
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:
<link rel="stylesheet" href="/_shed/kit.css">
<style>
:root { --signal: #6ad1ff }
</style>