kirupa.com

01 / FOUNDATIONS

Foundations

Shared colors, typography, spacing, layout, and CSS source files.

Agent Instructions / foundations

You are extending kirupa.com, not replacing its design. Tutorial and article pages keep the shared header/footer and main navigation unchanged: include the actual head.shtml, header.shtml, and footer.shtml at request time, retaining native chat, search, theme controls, and optional link sounds. Give them native title typography, prose, a left-nav item, and Filed under metadata. Write page and tutorial titles in Title Case, not all caps or sentence case, and match the h1, document title, and social metadata capitalization. Preserve established product names. The ROFL Design System's own pages are the exception: they use the standalone Lab Notebook shell from design/template.htm, generated by tools/build_design_system.mjs, and their footer always links back to the kirupa.com home page. Read head.shtml and kirupa.css in ssi/newDesign/src/. Reuse semantic custom properties, font roles, and source spacing, including style overrides. Keep display, body, code, and utility typography distinct. Choose foreground/background pairs by purpose. Fetch tokens.json only for exact declarations. Follow WCAG 2.2 AA for new or changed content: semantic HTML, keyboard access, visible focus, readable contrast in every theme, text alternatives, labeled controls, and explicit errors. Support zoom/reflow, respect reduced motion, and keep sound optional. Read /design/sections/accessibility.md for acceptance checks. Report unresolved barriers; automated checks alone do not establish conformance.

Edit the readable shared sources in ssi/newDesign/src/; node .github/tools/build-assets.mjs produces the minified files served from ssi/newDesign/. Base blue and generic dark properties are in src/head.shtml; other presets and their dark variants are in src/kirupa.css. Smooooth/Nature has its own src/styles/nature.css. Commit source and output, but deploy only output. themes.css and kirupa_html5.css belong to older surfaces.

The ROFL Design System has its own standalone shell, the Lab Notebook: graph paper, framed cells with crosshair corners, kirupa orange, pixel display headings, and a sectioned sidebar. It does not include the shared site header and footer, but its footer always links back to the kirupa.com home page.

Each section has its own page, and every component and layout has its own page under /design/components/ and /design/layouts/, listed as sub-sections in the sidebar. /design/ is the overview.

The top bar's Style switch shows every icon and live specimen in any of the site's styles and gently tints the shell's paper, grid, accent, and display face to match. Pixel is the Lab Notebook itself, and the layout, pixel orange, and ROFL wordmark never change; it and the color mode save only roflStyle and roflMode, never the reader's site choices.

Press ⌘K, Ctrl+K, or / to search sections, components, layouts, and illustrations. The shell lives in design/template.htm, design/design.css, and design/design.js; don't hand-edit the generated pages.

Tutorials and articles include head.shtml, header.shtml, and footer.shtml from ssi/newDesign/ at request time. The outer page keeps the normal theme picker, chat widget, search, and optional link sounds. Only isolated specimens omit production services. Article titles inherit .authorText h1 and its theme and responsive rules; do not add a compact title class or a separate mobile font size. Write page and tutorial titles in Title Case, as in ROFL Design System and Building Your First Interactive Web Page, not all caps or sentence case. Keep the same capitalization in the h1, document title, and social metadata; preserve established names such as JavaScript and kirupaBot.

Tutorials use the .leftNavContainer, .leftNav, and .leftNavContents markup with grouped h3 headings and .articleList links from ssi/newDesign/left_js.shtml. Keep the shared rail styling and responsive breakpoint; change the links for each section. Here is the actual shell on Building Your First Interactive Web Page:

The native tutorial shell

The native tutorial header, left navigation, article title, and Filed under metadata on Building Your First Interactive Web Page.

pixel / light / Blue palette / Fixed capture, 2026-10-19.

Use --pageBackground for the page, --bodyText for prose, --headerText for headings, --primary for the accent, --textOnPrimary for text on that accent, --structureBorder for quiet separation, and the --linkForeground/--linkBackground pair for links. Hover has its own --linkHoverForeground/--linkHoverBackground pair. An accent is not automatically an accessible foreground.

Semantic colors, resolved by the browser

LOCAL PREVIEW

Activate this specimen to load its real styles. No saved preferences change.

The slightly surprising --serifFonts name is the existing body-font role, not a promise that the font is a serif. Pixel uses Chakra Petch for body text, kirupaPixel (Born2bSporty v2) for display, and kirupaCode (Departure Mono) for code. Smooooth uses Nunito and Fraunces; Sci-Fi uses Michroma and Share Tech Mono; Minimal uses Inter; Ukiyo-e uses Yuji Syuku and Zen Old Mincho; Plakat uses Inter (as kirupaGrotesk) at heavy weights for display and regular weights for body text; Terminal uses Geist Mono for everything; Sketch uses Architects Daughter for display and the system sans for body text; 3D uses Fredoka and Nunito.

Type, rhythm, and inline code

LOCAL PREVIEW

Activate this specimen to load its real styles. No saved preferences change.

The source has measured values, not a universal spacing scale. Article headings use 35px top margin and 25px top padding; list items use a 1.75 line height and 1em bottom space; inline code uses 2px 5px padding and a 3px radius. Pixel media uses a 5px frame. Other styles deliberately override these values. Reuse selectors before extracting a new shared spacing token.

The type example uses the actual cascade. Keep pixel artwork on whole-pixel multiples with image-rendering: pixelated. Small utility labels must still be readable; do not use a display face for long paragraphs. The token ledger records selector scope and source locations, including style-specific implementation properties.

  • Do pair foreground and background roles and verify contrast in every supported mode.
  • Do preserve the orange and the source style's treatment; do not recolor a fixed-color asset merely because a palette changed.
  • Do not create a parallel --brand-blue/--brand-text universe when the existing roles already do the job.
Source mapssi/newDesign/src/head.shtmlssi/newDesign/src/header.shtmlssi/newDesign/src/footer.shtmlssi/newDesign/left_js.shtmlssi/newDesign/src/kirupa.cssssi/newDesign/src/kirupabot-widget.cssfonts/departure-mono-OFL.txt