Contact Us

Architecture

DOC-00020 reference implementor, developer

Architecture

This document covers cross-cutting technical principles that apply to all CORE-OWNED code in the theme.

JavaScript Minimization (REQ-00010)

Zero-JS by default. Every Astro component renders static HTML and CSS unless interactivity is explicitly required and justified.

  • Vanilla TypeScript is the interactivity layer for islands. Scripts are loaded only on pages that use them.
  • Interactive behavior is added only with a documented reason. “It’s easier” is not sufficient.
  • Progressive enhancement: every interactive feature must be functional (or gracefully degraded) without JavaScript. JS enhances; it does not gatekeep.
  • Avoid bundling large libraries client-side. If a feature requires a significant JS payload, reconsider whether it belongs in a static theme.

Reduced Motion (REQ-00085)

All CSS animations and transitions must respect prefers-reduced-motion.

/* Correct pattern */
@media (prefers-reduced-motion: no-preference) {
  .animated-element {
    transition: transform 200ms ease;
  }
}
  • Never use prefers-reduced-motion: reduce as the condition for adding animation — use no-preference as the condition for enabling it.
  • CSS transitions driven by data-state toggles are suppressed by the rule above for motion-sensitive users automatically.
  • Animated elements must convey state through non-animated means (e.g., color, text change) — animation is enhancement, not the only signal.

Touch Target Sizes (REQ-00088)

Interactive elements must meet WCAG 2.5.5 minimum touch target size: 44×44 CSS pixels.

  • Use --pt-space-* tokens for padding on buttons and links to ensure sufficient tap area.
  • Small visual elements (icon-only buttons, checkboxes, radio inputs) must have an invisible hit area expanded to the minimum size, typically via padding or a pseudo-element.
  • Do not rely on default browser button sizing — explicitly set padding.

Accessibility Scope (REQ-00090)

Accessibility requirements apply equally to all three surfaces:

  1. Theme UI — navigation, footer, modals, interactive components
  2. Content UI — article pages, doc pages, marketing landing pages
  3. Documentation/requirements UI — this site’s own docs and requirements pages

No surface is exempt. A component that passes axe on a showcase page but fails in a content context is still a violation. The lint:a11y:axe audit covers all showcase surfaces; manual verification covers the rest.

REQ-00010 normative Client-side JavaScript usage shall be minimized while preserving functional richness.
REQ-00085 normative Reduced motion preferences shall be respected.
REQ-00088 normative Interactive targets shall meet minimum size guidelines.
REQ-00090 normative Accessibility requirements apply equally to theme UI, content UI, and documentation/requirements UI.
REQ-00248 deprecated Alpine.js shall be loaded via a custom deferred integration that initializes Alpine only after DOM ready, avoiding the bundle overhead and eager initialization of the official @astrojs/alpinejs integration.
REQ-00249 deprecated Critical CSS delivery shall use a preload/swap pattern (link rel="preload" as="style" with onload swap) rather than build-time CSS inlining tools, avoiding complex build-time CSS parsing dependencies while maintaining above-the-fold rendering performance.
REQ-00267 implemented Configuration values consumed by build-time plugins (rehype, remark) in astro.config.mjs shall be defined independently of site.ts, because Vite path aliases are not available during Astro config parsing. Site overrides affecting plugin behavior shall be synchronized in both astro.config.mjs and site.ts.
REQ-00270 implemented The theme shall set a .dark class on the document element alongside data-theme so that Tailwind ecosystem libraries (Starwind, Flowbite, shadcn/ui, DaisyUI) can detect dark mode without adapter code.

Search

Search across pages and articles. Use arrow keys to navigate results.

Search across pages and articles.

Loading search...

Search is unavailable. Please try again later.

    No results for ""

    Try different keywords or fewer words.