Mixins / API

foldkit-mixins/foundations

foldkit-mixins/foundations: the page's foundations (the reset, the palette, the type) in the HTML, so its first paint already has the theme's background. A view's own Styles still arrive as it draws; this is the one stylesheet that belongs to no view.

The stylesheet is compiled from a module the application owns, through a server, as the page would compile it — so the build's foundations are the application's, not a copy. vite is loaded only here, never by a page: this subpath is node-only, and a page that imports it by mistake fails fast naming vite.

Functions

foundationsWrites the foundations into the page's head: in development through the running server, in a build through one of its own. Without it, each move between…
loadFoundationsCompiles the stylesheet a module exports: what the page's first paint is styled with before any script runs. The module is evaluated, so it must be pure…