Style: finalize structural sibling facts (:last-child family) at parent closure so late siblings match in the same frame, parse and match +/~ combinators from submitted siblings, and document the exact tree-context support. Flex: measured page/row/column placement with basis, grow, gaps and padding now sizes the gallery shell (header, scene row, controls bands) instead of manual rectangles. Paint: radial gradients reach every render path (desktop, pixmap, terminal, web, zx). Gallery: the catalog registry imports kryon/app (kryon/app_types is package-internal), fixing the widget-catalog project build broken by the entry-point removal; the desktop shell test follows the shared example build path and locates interactive controls by tree label.
The dom profile had no users: no owner project, template or editor preview
selected it; the web template and previews use Canvas. Delete frames_dom.zi,
dom.zi, dom_tree.zi, dom_metrics.zi, dom_raster.zi, the dom profile and
KRYON_DOM define, mk/dom-shell.html, the dom-profile-test and its fixtures,
and the DOM profile documentation. The browser story stays the Canvas2D host
(frames_web.zi); a backend = "dom" profile now fails with the ordinary
unavailable-backend error.
StyleBoxData carries the CSS translate property (StyleBoxTranslate),
which the paint transform pass applies after rotate, scale and transform,
so translate: 0 -2px lifts a box as on the web and eases with the other
transform fields. The widget part metric that used the name is
-kryon-content-offset in the CSS package; StyleContentOffset keeps its
meaning.
kryon/paint_transform gives Row, Column, Grid, Button, Card, Text, Link
and Image nodes the transform, rotate and scale of their style rules, with
hover and active from the pointer, about their transform-origin. When the
frame commits, every queued paint command of a transformed node and its
descendants takes the map composed through its ancestors: whole-pixel
moves, text (moved, turned and at the nearest whole font size) and images
(scaled and turned) are rewritten in place and keep the host's own
rasterizer; other shapes become PaintKindTransformed and draw as triangles.
A transform transition eases changes. Layout and hit areas keep the
untransformed boxes.
Transforms are opt-in: an app calls PaintTransformInstall() once, and an
app that does not links none of the code. StyleBoxData carries the
transform fields and PaintCommand an owner node and a matrix; the starter
bundle measures 4,078,241 bytes.
Card painted a surface at given bounds and handed back a content rect, so
every app measured its content up front and drew it into a Layout.Stack
slot. Card.Draw now opens Layout.Box with the card's resolved face: a
padded column whose fill, border, radius and elevation paint at its final
size, growing to its content when it has no height. Draw the content while
`opened`, then End(session). A clickable card is one press target on that
column, with hover and pressed faces from the previous frame;
CardContentBounds is gone.
The starter's task cards and the cheat sheet's note cards drop their
measured heights and Stack slots, the card and style picker examples draw
in a Layout column, and the gallery site's and two gallery scenes' cards
close with End. The dashboard follows with its Kryon pin. Layout's
LayoutContentBounds stays while the gallery scenes still use it.
Shot digests, light theme, before -> after:
card 670ccd2d21da -> 8cc61de0c49b
stylepicker c67487dfbb15 -> 08c9cae998f1
Row, Column and Grid paint a CSS linear-gradient() at any angle or toward a
side or corner, with two to six stops, from the vertical gradient the paint
queue already draws: a vertical gradient is one strip split at its stops,
any other up to 64 narrow strips, each split where a stop line crosses it,
so colors are exact along each strip's center. StyleBoxData carries the
gradient direction (the stylesheet computes it), corner, stop positions and
middle colors; the face keeps the first and last.
Layout.Box(session, props, face) is a padded column, or a row with
WidgetKindRow, that takes the given face's padding, gap and paint instead
of CSS of its own. Without a height it sizes to its children and paints its
box at End beneath them; its face waits on a small stack until the
container closes. A composite widget such as Card can lay out its content
in it instead of a fixed-height Stack slot.
Row, Column and Grid also paint a box-shadow's elevation role under their
box.
StyleSelector gains a context mask with an ancestor class and id, an
excluded class and an excluded state. A selector matches through one
ancestor (any open container, or with StyleContextParent the parent) by
its class and id, as the first child of the open container, and not with
its excluded class or in its excluded state.
The style_tree module, installed by BeginFrame, answers from the tree the
frame is building: the widget being styled is the next child of the
current parent. Rules without context skip it, so a sheet without such
rules does no tree work.
The starter bundle measures 3,885,985 bytes with this change (3,870,653
before it on the same tree, against 3,850,000); its budget becomes
3,950,000.
Row, Column and Grid paint per-side borders as square bands over the
uniform border: a side without its own width or color takes the uniform
one. With a border radius the box keeps its uniform border. StyleBoxData
carries the side widths and colors.
StyleBoxData also carries the outline width and offset of a focused
widget, and FocusRingFor gives the ring Button, ConfirmButton, Selectable
and Radio stroke on keyboard focus, from their focus-state rules; without
an outline rule it is the 2px ring at the edge as before. It replaces
FocusDefaultOutlineBounds.
width, height, min-height, min-width, max-width and max-height may be a
percentage of the parent's content box (a grid child's track for widths),
and flex-basis a percentage of a measured flex row's inner size. A percent
height in a parent that sizes to its content computes to auto, as in CSS.
StyleData, StyleBoxData and StyleFlexData carry a percent mask that the
cascade takes with each field's value; layout resolves it when it opens the
container, and other widgets skip percentages.
The guide now says what the CSS package reads natively: calc(), min(),
max(), clamp(), em, vw and vh lengths, nested & rules, box-shadow as an
elevation role, the font shorthand, --kryon theme colors, and which
selectors and paint stay browser-only with the native idiom for each.
In a placing Row an auto-width container takes the width its earlier
siblings left and a container in a fixed-height Row stretches to it.
CSS flex-grow on a container in a fixed-height Column takes the height
that is left, and an auto inline margin on a fixed-width container in a
row pushes it to the row's end. Text placed with no size fills a column
or grid track (a row keeps the text's own width) and takes its wrapped
line height, through Layout.LayoutChildWidth. Badge draws its label
where its parent placed it, and a full-width Button fills the column
that places it. The app starter's digests are re-recorded: one line of
its text anti-aliases differently.
A Row, Column or Grid whose stylesheet sets a background, border or
border radius paints that box like a styled div. A container of fixed
size paints it when it opens; a content-sized one records the paint
queue position, paints at End with its final height, and moves those
commands beneath its children with in-place reversals. Painting goes
through layout_paint_slot, which BeginFrame fills, so programs that
never paint, such as headless layout tests, carry no paint queue.
A container with no height from props or CSS opens at zero height,
places each child that has no x or y, and at End takes the height its
children used plus block padding, within min-height and max-height. The
tree runs a per-node close callback from TreePopScope, and the parent's
cursor moves on by the grown height: a column stacks, a row tracks its
tallest slot, a grid row grows. Flow is a real wrapping row, and
Layout.GridSpan spans the next placed grid child. App code passes no
sizes up front. The manual ColumnChildBounds, RowChildBounds,
StackChildBoundsFor and FlowChildBounds helpers are deleted.
Row, Column and Grid read margins (auto inline margins share the free
width, so max-width with margin: 0 auto centers), min-width, max-width,
max-height and overflow clipping from installed style rules. Text reads
text-align. A container moves its own box inside the slot its parent
placed through TreeSetSubmittedBounds, so siblings keep their spacing.
docs/API.md becomes a short index and its sections move verbatim into widget-package, control, motion, style, GTK theme, image, application, hosted-widget, host, game, audio, persistence, scene-rendering, painting and model references. The AVIF compression section joins BACKENDS.md and the renderer benchmark joins PERFORMANCE.md. The runnable HTML example leaves HTML_TO_KRYON.md for HTML_EXAMPLES.md, and cross links point at the new files. Every fact moves and nothing is dropped; the uncommitted Hosted widgets heading and SceneResizeOpaqueInto paragraph another lane left in API.md are kept. No stale claims were removed because every kept symbol still exists in the tree.