Files
bible/rules/patterns/web-visual-baseline

Web Visual Baseline — Reference Assets

The normative rules live in contract.md.

Canonical reference files (full, production version of the style) are in assets/:

  • assets/view.css — copy this as the starting stylesheet and adapt tokens
  • assets/view.html — reference page structure (header, panels, tables)
  • assets/upload.html — reference upload/open panel

Do not maintain a separate "starter" copy of the CSS anywhere; assets/view.css is the single source. For a new app, copy it and delete unused rules.

Icon workflow

Choose a named icon from Lucide, copy its SVG geometry into the project's shared sprite and retain the upstream license. Preserve the paths; give the symbol a stable application action alias. Render the symbol through the shared icon template, for example:

<button class="icon-btn" title="Download diagnostic log" aria-label="Download diagnostic log">
  {{template "icon" "scroll"}}
</button>

The icon template emits an SVG with a local use href="#i-scroll" reference. The sprite, template and CSS ship inside the binary. The browser never fetches Lucide or another asset host. Adding an icon does not add a runtime dependency.

Icon-only buttons in table rows

/* a layout rule that changes display must keep the icon centred */
.row-actions > .icon-btn { display: inline-flex; justify-content: center; align-items: center; }
/* every container that renders an icon resets fill, otherwise it is solid black */
.header-primary .icon { fill: none; stroke: currentColor; stroke-width: 2; }
/* fixed action slots keep icons in the same column on every row */
.task-actions { display: grid; grid-template-columns: repeat(3, 32px); gap: 4px; justify-content: end; }
.icon-slot { display: block; width: 32px; height: 32px; }