UI styles

Give game HUDs, menus, overlays, and forms a quiet, predictable baseline with two opt-in CSS entry points.

Goal: Use a basic UI until you're ready to stylize further.

See the default theme

The preview uses semantic HTML only. It has no Squander UI components and no required class vocabulary.

Choose the layer you need

Import reset.css when you want a normalized document baseline. Import ui.css when you want Squander’s dark, quiet utility theme. The theme does not import the reset, so each layer stays independently useful.

css
@import "squander/styles/reset.css";
@import "squander/styles/ui.css";

Use semantic markup

The theme styles native headings, links, buttons, form controls, dialogs, menus, fieldsets, tables, details, progress, and status outputs. Forms use compact aligned rows, and buttons use a flat lower ledge instead of a full border. Compose your game UI with the HTML semantics that describe its job.

html
<dialog open>
  <h2>Run paused</h2>
  <p>Resume when you are ready.</p>
  <button type="button">Resume</button>
</dialog>

Customize the tokens

Override the public custom properties in your application stylesheet. The shipped rules live in a low-priority CSS layer.

css
:root {
  --squander-color-accent: #7de2b0;
  --squander-color-control: #741c3b;
  --squander-font-display: "Your Display Face", sans-serif;
  --squander-font-heading-weight: 400;
  --squander-button-ledge-size: 3px;
}

Scope and limits

The stylesheet is globally active after import and is designed for game-facing HTML. It keeps heading steps close together instead of imposing document-style information hierarchy, uses compact form spacing, and reduces borders to purposeful boundaries and control edges. It does not create layout containers, style the WebGPU canvas, add runtime behavior, or provide a light theme. Consumer CSS can override the tokens and add application-specific layout or component rules.