Mixins / API
foldkit-mixins/layout
foldkit-mixins/layout: layout pieces (stack, cluster, sidebar, …) as
StyleValues. Each entry's rule text is the same for every caller: the
rules read --fk-l-* custom properties with token fallbacks, and the
options only write those properties inline. Ten stacks with ten gaps are
one rule and ten inline variables. The pieces are unlayered; a page puts
them in layouts with Layers.standard.in.
Two things a query cannot read from a variable are structural instead:
split's breakpoint (a @container or @media query) and stack's
split index (an :nth-child). Those are part of the rule text, so each
distinct value is its own class.
Namespaces
Functions
autoGrid | A grid that fits as many minItemSize columns as the width allows. |
center | Content centered inline with a maximum measure and gutters. |
cluster | Items that wrap onto new lines: tags, toolbar buttons, metadata. |
frame | A media frame with a fixed aspect ratio; an img or video child covers it. |
pad | Consistent padding from the space tokens. |
reel | A horizontally scrolling row. |
sidebar | A sidebar beside content that wraps under it when the content would get less than contentMin. Flex math, no query, so it needs no containment. |
split | Two columns above a breakpoint, one below. |
stack | A vertical stack that owns its children's block rhythm. |
switcher | A row that becomes a stack when narrower than threshold. Flex math, no query. |
Values
aside | The aside of a sidebar: composed by the child that is the sidebar. The other children are the content. |
intrinsic | A child of stack that keeps its intrinsic width instead of the stack's full-width default. The stack's child rule excludes this piece's class. |