Skip to documentation
SLOP

tiny.css

Reference tiny.css

Overview · API · Code relationships · Verification · Audit

Overview

A CSS cascade engine: tokenizer, selector grammar, cascade, and typed computed values, with no allocation once a sheet's storage is sealed.

Shape

token turns bytes into CSS Syntax Level 3 tokens. selector turns a prelude into compounds of interned atoms, a specificity, and a bucket key. property holds the closed property set with each property's grammar, initial value, and inheritance. value turns a value span into a sixteen byte declaration record. sheet runs all four over one source and publishes the flat tables. match walks a compound chain against an element vtable, and cascade folds the winning declarations into a computed style.

Two phase memory discipline

Parsing splits into an allocation free inspection pass (Limits.inspect) that counts every array, and an emission pass that fills a single aligned block (Storage). Both passes run the same parser over the same sink, so a counted bound and a filled result cannot drift. Once sealed into .steady the parser performs no allocation and asserts admission rather than growing.

Ownership

Every published slice borrows from the sheet placement, and every string borrows from the caller owned source bytes, so the source must outlive the sheet. Workspace frees the previous block when it grows, which invalidates any StyleSheet returned by an earlier parse.

Import direction

This package names no node model. An element reaches the matcher through the match.Element function table, and element type and role names reach it as atoms the consumer resolves once through StyleSheet.token.

Definitions

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

Values and defaults

Public values and defaults.

Code relationships

Direct static dependencies extracted from parsed source by semantic graph analysis.

Uses: tiny.accy, tiny.bench, tiny.hypothesis, tiny.sys, tiny.xkb
Used by: tiny.accy, tiny.choir, tiny.smg, tiny.ui, tiny.windowing

Verification

No verification records are cataloged for this module in this build.

Audit

EvidenceValue
Sourcelib/css/src/root.zig
Definitions25 of 27 documented
Members0 of 0 documented
Public names27 API, 291 indexed
Version26.7.0
Revisiondaab053ee433