This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
CSS layout and painting
CSS overflow accepts visible, hidden, clip, scroll, and auto.
clip clips without a scroll container or the zero automatic minimum size of hidden. auto clips and
permits scrolling, with indicators shown only when content overflows. A visible
axis beside hidden/scroll/auto computes to auto, as on the web. Beside clip it
stays visible: overflow-x="clip" clips sideways overflow and leaves what
overflows below showing, with square corners.
filter on a box or an image takes CSS's functions in order (blur,
brightness, contrast, drop-shadow, grayscale, hue-rotate, invert,
opacity, saturate, sepia): image "assets/logo.png" filter="brightness(0.6)"
dims a logo. The element and its content are drawn, then filtered (Filter
Effects 1 §12); the web, macOS and iOS draw it, and Linux draws it unfiltered
for now (SVG Gallery's fx-box-filter and fx-image-filter). url(#id)
naming an SVG filter works on SVG elements everywhere, but on a box or an
image only on the web: Apple does not take it there yet (LLP 1055.000 §0).
In drop-shadow(), an omitted colour or currentcolor uses the element's
color; the colour may precede or follow the two or three lengths.
backdrop-filter="blur(8px) saturate(1.14)" filters content behind a box;
the two functions may appear in either order. On macOS it samples only the
parent's subtree: the parent's own paint and earlier siblings. Content behind
a clear wrapper can therefore show through sharp. Make the glass a direct
sibling of the content it covers, including a scrolling list. iOS and tvOS
draw the system blur approximation described in LLP 1053.000 §3.
-exact-glass-tint tints the glass of a box with backgroundMaterial="glass" or
"glass-clear": -exact-glass-tint="rgba(232,192,99,0.9)" is a gold button,
"rgba(10,12,16,0.55)" a dark panel. It is a colour resolved in the box's colour
scheme (light-dark() and the platform colours work). iOS and tvOS 26 set it as
UIGlassEffect's tintColor and macOS 26 as NSGlassEffectView's; unset, these
hosts leave the glass untinted. A background-color is painted behind their glass,
not into it.
The painted hosts (Android, Windows and Linux) draw the material's tint plus a
backdrop blur, without Liquid Glass refraction or specular highlights. With no
background colour, "glass" uses #ffffffb3 in light appearance and #262629b3
in dark, with a 20 px blur; "glass-clear" uses its lighter table tint and a 10 px
blur. -exact-glass-tint replaces the table's tint. An authored nontransparent
background-color replaces that tint instead; the blur remains. Android before
12 draws the tint without the backdrop blur. The web also draws a tint and blur,
with -exact-glass-tint in place of the table's tint unless a background-color
overrides it.
On iOS and tvOS 26, glass reacts to a touch when its box has a press and is not
disabled; glassInteractive=false turns that off on a pressable box and
glassInteractive=true turns it on for one without a press. Other hosts ignore
glassInteractive. Neither it nor -exact-glass-tint applies to a native button,
whose glass is its buttonStyle's.
flex accepts CSS none, auto, initial, unset, a basis, or
<grow> [<shrink>] [<basis>] (including flex="0 1 auto"). Numeric bindings
keep the n 1 0% meaning. flex="initial", flex="unset" and a conditional
binding's none arm (including a conditional class's absent row) restore
0 1 auto; the CSS keyword flex="none" means 0 0 auto.
Shorthands may be literal choices; computed strings are refused. A scroller
with min-height=0 and positive shrink fits under a bounded flex column.
display="grid" takes grid-template-columns and grid-template-rows as
CSS track lists: px, rem, %, fr, auto, min-content, max-content, named lines,
fit-content(px or %), minmax() and repeat() (fixed counts, auto-fill,
or auto-fit). Track lengths also accept calc(), min(), max() and
clamp() over px, rem and %, including inside minmax() and valid repetitions:
grid-template-columns="repeat(auto-fill, minmax(min(100%, 12rem), 1fr))".
Percentages use the grid's content box in that axis; when it is indefinite,
they act as auto during intrinsic sizing and resolve against the resulting
size. Negative calculated sizes clamp to zero. The wire and web use equivalent
canonical CSS, so whitespace and simplified expressions may differ from the source.
Calculated fit-content() limits, other length units (em among them), var() and env()
remain unsupported here; grid-auto-columns and grid-auto-rows are not yet
Contract attributes. See CSS Grid's track sizing.
Dimension rows (width/height, their min/max, padding/margins, offsets and
border radii) accept vw, vh, vmin, vmax, and svw/svh/lvw/lvh/dvw/dvh.
On native, all viewport variants follow the window: small, large and dynamic
viewport sizes coincide and update on resize. On iOS and the Mac every viewport unit
is the window's wherever it is written, never a sheet's or a pane's: on the Mac a
list's column beside its detail, the detail's pane and a page beside a sidebar all
read the window's width, as exactViewport().width and @media do. A view embedded
in another app's window reads its own size. On the web, browsers resolve
vw/vh against the large viewport and the other variants against CSS's
small/large/dynamic viewports. Font size, line height, letter spacing, text indent,
gaps, border widths, border spacing and shape margin accept these units too.
Dimension rows also accept the container units cqw, cqh, cqi, cqb,
cqmin and cqmax, alone or in a math function: a share of the nearest
content owner's content root on each axis its host fixes,
else of the small viewport (LLP 1123 D16). The text and spacing rows above take
them too, against the same content root and again when it resizes; custom properties
and inset overrides refuse them. The web writes them as CSS's, which resolve against the
small viewport until a content root declares a container there, and leaves an
SVG attribute in one unwritten.
Inherited font sizes and lengths in em follow the resolved font on resize.
A route beside a native tab sidebar can be narrower than 100vw. In a padding
calculation, calc(100vw - 100%) is the window width less the containing block's
width, not a leading-bar inset: a sheet or a trailing rail can also narrow it.
Do not infer the side of a bar from the width difference.
Dimension rows also take env(safe-area-inset-top|right|bottom|left) and CSS's
calc(), min(), max() and clamp() over px (and in/cm/mm/q/pt/pc/ch/lh),
percentages, those insets, viewport segments and viewport lengths. Functions
can nest, add or subtract lengths, and multiply or divide by a number:
padding-bottom="clamp(15px, env(safe-area-inset-bottom), 60px)",
bottom="calc(clamp(15px, env(safe-area-inset-bottom), 60px) + 59px)",
width="min(50%, calc(100vw - 2 * env(safe-area-inset-left)))".
clamp() takes none for either bound (clamp(none, 20px, 50px)). CSS's
order is clamp(MIN, VAL, MAX), not React Native's clamp(value, min, max).
Native hosts resolve percentages during layout and update calculations when
insets or viewport dimensions change. The web uses CSS functions directly.
The insets are the document's: on the web the browser's, and on a native host the
device's under viewport-fit="cover" and 0 under auto, even on iOS when a root
tablist or navigation stack takes the whole screen; there a box at the root that
pads with them stays under the status bar
(pitfall).
var(--exact-safe-area-inset-top|right|bottom|left) is the safe area where the box
is, a term in the same places as env() (LLP 1123 D9). Inside a route, a tab, a
sheet or an arranged pane it is that container's own, as UIKit's safeAreaInsets has
it: the status bar, the navigation bar and a large title, the tab bar, the home
indicator, a sheet's edges. Outside every route it is what the page itself reaches under: on
iOS the status bar and the home indicator whenever a root stack or tablist takes
the whole screen, even where env() is 0. On the web and a host that draws no bars
it is env()'s, and a web sheet's top is 0. It takes no fallback, and it follows
the bars as the host lays them out (a rotation, a bar shown or hidden). Any box may
set it for its subtree, spelled as it is read:
--exact-safe-area-inset-bottom="0px" (a length, no percentage; one that reads
itself is ignored, as a CSS cycle is).
Use var(--exact-bar-inset-start) and var(--exact-bar-inset-end) for the width of navigation beside the route. The reading box’s direction determines start and end. On iPad a tab sidebar beside the route counts, and on iPhone Duo a visible tab rail counts, even when it occupies the device’s side inset. A side without a bar reads 0px, as do both sides on other hosts. A split column reads the bar on the edge it adjoins. A drawer over the route and a sheet’s own margin contribute zero.
In a left-to-right box, padding-left="max(10px, calc(22px - max(env(safe-area-inset-left), var(--exact-bar-inset-start))))" leaves 22 points where both insets are zero and 10 where either reaches 12 points. For the same physical left padding in a right-to-left box, use --exact-bar-inset-end.
The host clears a route's content of the chrome it did not write (LLP 1123 D3), on
every host with bars: on each edge it pads the route by that inset, or the route's
scroller takes it as its content inset where the scroller starts at the route's top
or ends at its bottom. The clearance adds to the route's own padding
(padding-top=16 under a 106-point bar puts the content at 122), except where that
padding reads the inset itself (env(safe-area-inset-top) or
var(--exact-safe-area-inset-top), alone or in calc(), min(), max(),
clamp()): then the edge is the larger of the two, so
padding-bottom="max(16px, var(--exact-safe-area-inset-bottom))" is "at least 16, or
the home indicator". Padding on a box inside the route always adds. A header the
bar replaces neither clears nor counts. -exact-safe-area on the route (or a
tabpanel) turns the clearance off: none, or the edges to turn off
(-exact-safe-area="top"), the rest staying cleared; anywhere else it is refused.
In an Android sheet, the route clears the visible grabber and the header that the
sheet's bar replaces. This clearance moves the origin of an absolutely positioned
child. On iOS, when the replaced header is followed by a list that takes the top
inset, a sibling at top=0 starts at the route's top edge. To position an overlay
from another view's frame() on both hosts, place a 1-by-1 view with position="absolute",
left=0 and top=0 beside the overlay, with pointer-events="none" and aria-hidden=true.
Subtract that view's frame origin from the anchor's frame origin. The route's
own frame() measures its border box, including the area behind the chrome.
The route's background-color already fills under the bars. For a background or
picture under the bar:
•
Where the route is padded, pull a box at its top up and pad it back:
margin-top="calc(-1 * var(--exact-safe-area-inset-top))" padding-top="var(--exact-safe-area-inset-top)". Its content starts below the bar
and the boxes beside it stay where they were.
•
Where a scroller fills the route's width: on iOS it reaches the display's sides unasked,
as UIKit's does, its indicator outside the iPhone Duo's side bar and its content clear of
it. Padding around the scroller, a border or rounded corners on it, or a box around it
that clips keeps it in its own box. To draw its content's background or picture under
the bar, opt the sides out (-exact-safe-area="left right" on the route) and inset the
rest of the content: padding-left="var(--exact-safe-area-inset-left)", and the same on
the right. The sides are zero on an upright phone, so a screen that turns them off and
pads nothing shows no fault there: the build names a route that turns a side off where
nothing in it reads that side's inset (lower-safe-area-unpadded).
•
Where the route's scroller starts at its top (a list under a large title), opt the
top out and pad the scroller's first box: -exact-safe-area="top" on the route,
padding-top="var(--exact-safe-area-inset-top)" on the hero. The scroller then
starts under the bar, at its start the hero's background reaches the screen's top
and its text rests below the bar. navigationBar="transparent" does the same and
also hides the bar's background until the content scrolls under it.
To know the area a box drawn across the whole route covers, measure that box
with resize=<action> (as resize=fit below), not the route or
exactViewport(): a route's outer box can span the window while its content
clears a bar.
A box outside every route clears the status bar with
top="var(--exact-safe-area-inset-top)".
Sizes, padding and radii clamp negative results to zero; margins and insets keep
them. env(titlebar-area-x|y|width|height) is the title bar beside a Mac window's
traffic lights under viewport-fit="cover". It is zero in full screen or while the
session's toolbar fills the title bar. Once navigation history retains a toolbar,
it stays (LLP 1115.000, retention as built). In a single-location app, a root header
can bring a toolbar before history retains one; it goes away when that header hides
or its route says navigationBar="none". Routes that all withhold their bars before
history retains a toolbar bring none; an authored toolbar or sidebar can still
supply one. With no toolbar of the session's own, "display_override": ["window-controls-overlay"]
in app.json gives the page the platform's tall title row and its title-bar area,
routes or not. In that row the page's presses are its own and its empty ground drags the
window. With viewport-fit="cover" and no toolbar, AppKit leaves a standard native button
outside the title bar's drag region. A painted pressable can still lie inside it, even
with app-region="no-drag". The Mac agent reports windowDrag=true when it taps there.
Elsewhere the area is undefined, so give it a fallback (contract vocab titlebar-area). Unsupported: em, a unitless number where a length goes
(write 0px, not 0), a var() naming neither a design token nor one of those four, more than 32 values or 32 levels (LLP 1001 §2,
"Comparisons").
translate takes one or two lengths, each in px, a percentage of the box's own
border box, or a calc() of the two, as CSS's does: left="50%" top="50%" translate="-50% -50%" on an absolute box centres it, a percentage follows the box's
size, and translate="calc(50% - 12px) 0" adds a px offset to it. Transitions and
keyframes interpolate the px and the percentage separately, as CSS interpolates a
calc(), so any two values interpolate. A rem, viewport or env() length, or a
min()/max() that does not simplify to px plus a percentage, is refused.
Transitions animate translate/scale/rotate/opacity, box paint (color,
background-color, border colors, -exact-tint-color, box-shadow), SVG paint/geometry
and pixel heights. On Apple, numeric height transitions work with either
box-sizing, without interpolate-size="allow-keywords". An auto endpoint
requires that opt-in and box-sizing="border-box"; automatic height transitions
require one layout root and no registered content region. width and other general layout
properties cannot interpolate yet: native layout is not run per frame.
The diagnostic names this engine limit; -exact-layout-transition animates a
change in the laid-out box using the existing measured projection.
cursor takes CSS cursor keywords (pointer, grab, grabbing, etc.) and
inherits. Web emits CSS; macOS maps to NSCursor with system artwork stand-ins
where needed; iOS/tvOS/Linux ignore the hint (LLP 1001). URLs are refused.
Omit font-family for the platform's font. font-family accepts literal CSS fallback lists and choices of them, including
"Inter, system-ui, sans-serif" and quoted names. A family declared with
font uses its bundled faces; other names are local installed families,
whose own italic and bold faces font-style and font-weight select by CSS's
matching (a family without the face draws its nearest one, never a synthesized
slant or smear: LLP 1019 §5). Web, Apple and the painted hosts try authored
families in order for each glyph, then use platform fallback.
Under Charlie's 2026-10-11 ruling, a string from state or data may also name
an installed or generic family list, as in font-family=family. The JS web
target applies it as CSS; macOS, iOS and Linux register session-scoped stacks
and resolve installed faces when the string changes. An invalid list (an
unquoted name that is not CSS identifiers, such as Arial; or 1Arial: quote
it) and inherit, unset or revert leave the family unset, so the text
inherits its parent's family, as the browser does; initial is system-ui. Runtime strings do
not load font files.
A runtime choice with a bundled-font literal is refused so it cannot silently
select an installed face with the same name; write bundled choices as literals.
A text with selectionchange=act hears the reader's real text selection
on the web, macOS, iOS, Android and Linux. action act(s: Selection) gets s.text, s.start and
s.end in the node's own text ("" at 0, 0 when nothing there is selected).
On web, macOS and Linux, s.rects is a list of Geometry snapshots for the selected
fragments in viewport space. It is empty when cleared. iOS and Android report an empty list.
removeAllRanges() clears the reader selection on web, macOS and iOS, and
setSelectionRange(id, start, end[, direction]) selects a text on web and
macOS using source UTF-16 offsets. Both report changed parts through
selectionchange; see text selection.
Drive it with tap <id> drag <dx> <dy> from <x> <y> mouse; on iOS, where a
long press or a double tap selects a word of text its author made selectable
(user-select="text"), with tap <id> contextmenu [at <x> <y>] or
tap <id> dblclick [at <x> <y>], whose reply's selection says what was
selected (under --touch platform, tap <id> drag 0 0 press 900 is a real
long press).
For a plain text field on the web, macOS, iOS, Linux, Windows and Android, setRangeText(id, text[, start, end[, selectionMode]]) replaces its selection or a UTF-16 range. Selection
is preserved by default (select, start, end are the other modes).
Exact deliberately fires one input so its action can update the bound
value, with InputEvent.inputType="insertReplacementText". On macOS and focused
iOS fields, a changed value is one undo step; web and Linux add none. That input
type also covers hatch replacements and browser spelling
corrections, so it does not uniquely identify this command. select follows
input only when the selection changes. URL inputs trim surrounding ASCII
whitespace. Markdown editors on web and Apple use source offsets and add one
undo step. On Linux, Windows and Android, range replacement requires a plain
field. To edit and preview Markdown there, bind a plain textarea and a
text markup="markdown" reader to the same string. The terminal host
refuses setRangeText. Field
selectionchange reports caret moves through InputEvent, and
beforeinput reports the proposed edit's inputType and optional data.
Call preventDefault() to reject a cancelable edit; composition events
are noncancelable. See the form controls
section for host limits.
Book typography is CSS's on every host. text-align="justify" fills all but
a paragraph's last line. text-indent is a length (text-indent="1.5em",
text-indent=24; negative with the same padding-left hangs the first line).
hyphens is manual by default: a soft hyphen (U+00AD, written as the character itself or from data) breaks
and shows a hyphen; none ignores it; auto also hyphenates by the document's
language on the web and Apple (Linux has no dictionary and breaks only at soft
hyphens). Under overflow-wrap="break-word" iOS may break a long word with a hyphen it draws, so text that can
hold an address or a code (a URL, an email, a key) takes hyphens="none": a hyphen inside it reads as part of it.
text-wrap="balance" (CSS's text-wrap-style, inherited) evens a short
paragraph's lines, for a tooltip, a toast or an empty state's message: the
lines before its first forced break keep their count and break where Chrome's
do, on every host. It balances up to six lines (more, a line-clamp, or a
word wider than the box, wrap as usual), moves only the breaks (the box measures as
before, and text-align places the lines in it), and auto turns it off. pretty and stable are refused; supported values are auto | balance.
-webkit-font-smoothing="antialiased" (inherited) draws text as Chrome and
Safari on the Mac do under that property: lighter glyphs, without the stem
darkening the Mac's default smoothing adds. Write it on the root only when the
web app being matched sets it; unsaid, text is the platform's. AppKit draws it
and the web writes it. Linux, Windows, a terminal and the widget and watch
drivers accept it and draw as before, as browsers off the Mac ignore it; iOS
is expected to as well, but has not been measured. none and
subpixel-antialiased are refused; supported values are auto | antialiased.
text-box cuts a paragraph's line box to its glyphs (CSS Inline Layout 3 §4),
to centre a label in a pill or line a heading's cap height up with an icon
without padding by eye: text-box="trim-both cap alphabetic" trims the first
line down to the cap height and the last up to the baseline. Write the trim
(none, trim-start, trim-end, trim-both) and the edges in either order,
or normal; the edges are over (text, cap, ex) then under (text,
alphabetic), and auto or a lone text sets both (a lone cap or ex is
refused: CSS's one-word edge also names the under edge). The longhands are
text-box-trim and text-box-edge. The cut uses the paragraph's own font, as
CSS's root inline box: a smaller run inside does not change it.
text-box-edge is inherited, so it may sit on a view above; the trim is
not, and goes on the text. Exact refuses the trim on a view or a column
(CSS trims a block's first and last lines, which Exact does not reach yet), on
an inline text run, on a text that is itself in columns, one included (CSS
trims every column), on a text laid out as flex or grid (CSS does not trim
it), and the ideographic edges. A later declaration, the node's own over its
class's, overrides an earlier one, and a ?: choice of literals is refused
only when one of its values would be. A paragraph split across a view's
columns is trimmed at its outer ends only. Every host trims: Apple and Linux
measure and paint the cut, the web writes CSS's own text-box.
Multi-column layout is CSS's (LLP 1093). A view (or a text) with
column-count, column-width or columns="12em 3" flows its content through
columns of one width, separated by column-gap (unset, 1em) and an optional
column-rule="1px solid #ccc". column-fill is balance (the initial value:
columns as even as the content allows) or auto (each column filled to the
height in turn). Give the box a height and its overflow columns continue
sideways, one per page: that is how a reader pages a chapter, moving the
container by translate a page width plus a gap at a time, and reading where
the flow ends with frame() of an empty view after the last paragraph.
widows and orphans (2 by default, inherited) keep a paragraph's first and
last lines off a column's edge; break-before/break-after take column,
avoid, avoid-column; break-inside takes avoid. On native hosts a box
that has its own height, a background, a border or a shadow, a row flexbox or
a grid, is kept whole in one column where Chrome would split it; the journal
says so once per box. Refused, each saying what to write: column-span, page
and region breaks, balance-all, dashed or dotted rules, and multi-column rows
on row or column (CSS ignores them on flex and grid; write view).
A text field (input of type text, email, password, search, tel,
url, number or no type, and textarea outside the Markdown editor) is the
platform's own field by default (LLP 1104). On the web it inherits the page's
font, as a CSS reset does; other platforms use their control's own text style.
Its text is its own color, else the design's FieldText, else the
platform's field ink, on every host: a colour set on an ancestor never tints
it (LLP 1115 D4, LLP 1121 D9). A field of your own (appearance="none") and
the Markdown editor inherit color as text does. Disabled and placeholder
appearances are the platform's. To colour
the placeholder, write CSS's ::placeholder as a block under the field (its
value may compute) or in a style; it admits color alone, with its own
alpha, and without it the placeholder keeps the platform's colour (LLP 1104
D3; contract vocab ::placeholder):
contract
style Field
::placeholder
color="#6b7280"
component App
state dark = false
view
column
input placeholder="Search" class=Field
textarea placeholder="Notes"
::placeholder
color=(dark ? "#9ca3af" : "#6b7280")
A pressed, hovered, focused, disabled or checked look of your own is a state
part (LLP 1121 D8): a block of that state's paint rows, in a style or under
the node before its children.
contract
style PostButton
background-color = "#1083fe"
:active
background-color = "#0b5fbd"
:disabled
background-color = "#9cc8fb"
component App
state busy = false
view
column class=PostButton press=post disabled=busy
text "Post"
action post
busy = true
:disabled and :checked (checked, or aria-checked, aria-selected or
aria-pressed true) are the runner's: they take background-color, color,
border-color, opacity, box-shadow and -exact-tint-color, :checked
under :disabled, and :disabled is your own disabled look (no default dim).
:active is the host's own press of the innermost node with a press or a link's
href (link href=, button href=, as CSS's a:active): it takes
background-color, color, opacity, translate and -exact-press-scale, which become the
node's pressed paint (LLP 1061 D7). Its opacity is the opacity it shows
pressed, not a share. On a custom node they replace the host's default press
and move under Reduce Motion too. On the web, Linux, Windows and Android each
property takes its timing from the node's transition: a property it does not
cover lands at once, so transition="none" lands all five at once. Without a
transition, each moves as the platform times a property change: GTK's button
timing on Linux, WinUI's on Windows, Compose's default spring on Android, and
120 ms on the web, which has no platform press timing. On Apple they ease on
the press curve. Native buttons keep their own feedback and its timing beneath
each authored override. On Linux, Windows and Android their authored colours
land at once, as do their authored opacity, scale and translate unless their
transition covers them. The translate of :active
is an offset added to the node’s own translation: translate="4px 4px" moves a button onto an offset shadow
plate. It takes x and optional y, in pixel lengths or percentages of the
current border box by default. A third value is refused: a press is
a 2D offset; use transitions for 3D motion. Layout stays unchanged. On the web the hit area moves with the paint, as CSS
does, and the browser’s click rules apply. Native hosts keep the unpressed
hit area and use their press timing. Release or cancellation removes the offset.
Its targets may compute during ordinary commits, including a conditional class
and none to clear a target. Pressing needs no runner round trip.
Absolute active opacity and -exact-press-opacity are mutually exclusive
(lower-state-press-paint), as are two declarations of the press scale. Border
and shadow targets remain unsupported until their host paint is implemented.
:hover and :focus-visible take background-color, color,
border-color, opacity and box-shadow, shown at once while they hold (a
:hover replaces the platform's hover wash, as :active its press; on
the web a transition of the node's own on one of those rows still times it), the
focus's over the hover's, under the press. Each host applies them on its own
tracking, over the node's rows (rows a part doesn't name show the base, also a
base that changes while pressed); hover and focus rows are literals, tokens included. A
disabled node takes none. The web (both targets) does this today; Apple, Linux
and Android follow (LLP 1121 stage 8 B). A look's color reaches the node's text
as its own color does (a descendant that writes its own keeps it), so
:hover color="ink" on a link recolours its words, under a color-scheme
boundary too; the web and Apple (a Mac's pointer, an iPad's) show it, and
Linux's looks paint the box alone. They also take scale, which stands in for
the node's own scale while the look holds: like it, it never lays out, and a
-exact-press-scale multiplies onto it. It moves there and back on the node's
own transition for scale, as a :hover rule's value moves in a browser, on
every host with a pointer (the web, a Mac's, an iPad's, Linux and Windows); with
none it snaps, and on the web so does one under a -exact-spring. An icon
button that grows on hover:
button scale=1 transition="scale 150ms ease" with :hover scale = 1.08.
Native buttons and list rows accept
:active; their other states remain the platform's. Active properties keep a
button native, including with appearance="auto". Each written property overrides
that field; unwritten fields keep the native highlighted state. Clearing a target
restores the current native configuration. UIKit and AppKit own native button
tracking, cancellation and accessibility. Native Apple controls add no fixed
press curve to authored properties. A projected bar item, tab segment, menu row or
confirmation action accepts only properties its native API can express. The
host rejects an unsupported combination in the journal and keeps the native
component. A UIKit title-only bar item supports active color; image bar items
and per-item segments do not. Remove the unsupported properties.
Other native controls refuse state parts.
A node's own part whose state it never writes (:disabled with no
disabled) is warned of (lower-state-dead).
A native control takes accent-color and, a field, the design's Field,
FieldText and placeholder roles, where its host honours them: the
schema's control-role table says which, per host
(docs/control-roles-measured.md). For each target the app ships (not the
terminal, which draws no colour, nor tvOS or watchOS, which have no column), a
parameter you set that the host there does not honour is said once, one line
for each declaration that sets it, naming every host and control
(forma-unreachable: accent-color on macOS switches: NSSwitch draws the system accent (the first at line 12; LLP 1121 D9)): the platform's look is
the answer there, or a control of your own (appearance="none", or a styled
pressable for a disabled prominent button). It is information, not a
problem: verify and test say it as a note and do not count it. A field's
own color, background-color (or background) or ::placeholder color
wins over the role, so it is not judged.
A style a native host does not draw as written is recorded on its row in the
schema (hosts), and contract vocab <name> prints it. A style with no such
line has no gap on record, which is not a measurement. For each target the
app ships, an undrawn style is named once by style-undrawn, with the
unsupported scope and a supported route where one exists. It is information,
as forma-unreachable is. tvOS reads iOS's entries; a host that draws a style
differently (differs) is said by vocab alone.
For overprint with mix-blend-mode="multiply", put the background and all
crossing shapes inside one svg. iOS and tvOS composite that SVG in Core
Graphics; Android rasterizes it with tiny-skia before sending the picture to
its reader. macOS keeps its public Core Animation layer blend, including the
backdrop outside the SVG. The other CSS blend modes are supported there too. Blending with
boxes or a different surface outside that SVG remains unsupported on iOS and
Android. Canvas 2D's globalCompositeOperation = "multiply" also draws on both:
draw the backdrop and foreground into the same canvas. It does not blend the
canvas with the page beneath it.
A background, border or radius makes it your own box, as in a browser;
appearance="none" says so explicitly. This is decided once after classes
and shorthands: a row on any conditional arm counts, even if its value is
none on another arm. background-clip and background-attachment do not
make it bare. appearance="auto" explicitly asks for the native field and
refuses background, border and radius rows, naming each longhand. Appearance
is a literal, resolved from the class then the field's own attribute; to
switch it, write if with two fields. Excluded input types and the Markdown
editor keep the bare text-input box or their existing specialised control.
A focused field shows the platform's ring: the OS's on a native field, Exact's
on a bare one (LLP 1104 D6). outline="none" (or outline-style="none")
takes it off on every host, for a field whose focus you draw yourself, such as
a ring on the card around a composer. It does the same on any other element
that takes the focus (a button, a link, a native control, a tabindex
box), as CSS's does; tvOS keeps its focus effect, which is how a remote
moves. The card's focusin and focusout
handlers hear the field's focus on every host without making the card a Tab
stop. focusout also fires when focus moves between descendants and when the
focused node is removed; use its FocusEvent.relatedTarget to identify a
subtree exit. stopPropagation() stops a focus event at its current handler;
autofocus delivers these events too, with IDs read when focus moves.
An element with no visible focus fails WCAG 2.4.7. Tab still reaches it and its accessibility is unchanged. Only
none is admitted.
textarea rows=3 sets its preferred height in lines (default 2); explicit CSS
height and field-sizing="content" override it. maxlength=80 on text inputs
and textareas limits user edits in UTF-16 units; authored value updates are
not truncated. It does not apply to input type="number".
intersect=seen observes geometric intersection with the nearest ancestor
scroll container (or viewport). action seen(e: IntersectionObserverEntry)
reads e.isIntersecting and e.intersectionRatio; authored arguments precede
the optional record. It fires once on mount, including offscreen, then on
enter/leave at threshold 0. The ratio is a snapshot, not a continuous progress
signal; edge contact may be true with ratio 0. intersect-margin="200px"
expands the root for overscan; a literal of one to four px/% lengths (units
are case-insensitive) has IntersectionObserver's rootMargin semantics (percentages use the corresponding
root dimension, as in Chrome).
On iOS, a resizes-visual route's viewport also counts as a root. overflow: clip remains
an intervening clip, and margins expand only the observer root.
Removing a node stops observation, with no synthetic leave. Both web targets
use the browser. AppKit, UIKit and Linux sample native layout and scrolling;
inline runs, moving presentation geometry, rotated roots and SVG clip references
remain unqualified (LLP 1005, intersection visibility; LLP 1001 records the
percentage-margin spec deviation). Other native hosts remain unqualified.
Container queries and live-position feedback are still deferred.
resize is CSS's: vertical (or block), horizontal (inline) and both
give a textarea the grip a person drags to size it, on the web and on the Mac
and iOS. Only a textarea has a grip on a native host, and no native host other
than the Mac and iOS draws one. The drag writes width and height as the
browser's inline style does, inside min-* and max-*. Tailwind's preflight says textarea { resize: vertical };
here a textarea's default is none. Given an action instead,
resize=fit is the element resize event, ResizeObserver's: fit hears the
content box's width and height after the first layout and whenever they change
(one more parameter: its DOMRectReadOnly), on every host
(Events); read other boxes there with frame(id)
rather than polling with a timer. user-select="none" prevents
ordinary text selection; auto is the default, and on the Mac it is AppKit's:
a label inside a button, link or other control, or in a header, nav,
footer, toolbar, tablist or menu, is not selectable, while an article's text
and other content text is (so put prose a reader copies in article, not a
header). On iOS auto is UIKit's, where a label selects nothing: write
user-select="text" on prose a reader copies (on the text or a container above
it), and a long press or a double tap there selects a word with the system's
handles and its Copy, Select All, Look Up, Translate, Search Web and Share menu.
Putting user-select="text" on a container around multiple selectable text
paragraphs spans all of them with one shared selection (SelectionDocument),
provided there is more than one selectable paragraph, none of them has a
contextmenu, context popover or inline context menu, and no scroll container
or pressable sits between the touched paragraph and that container. A user-select="all" container spans all of its selectable paragraphs as one
atomic unit when none of them has a contextmenu, context popover or inline
context menu (even across a nested scroll container or pressable, per CSS UI 4
§6.1). A selectable paragraph inside a scroll container below a
user-select="text" container (such as a horizontally scrolling code box inside
a comment) joins the outer shared selection while a selection started outside
the scroll container is active, while a selection started inside the scroll
container stays within it. On both macOS and iOS, Copy joins separate selected text blocks with a
blank line (\n\n), so a code block whose lines should copy with single line
breaks belongs in one text with white-space="pre" (using inline runs for
highlighting). Tapping outside an active iOS selection clears it, and
removeAllRanges() clears it from Contract. A label inside a control stays
unselectable unless the
text is said on it or inside the control. On the web auto leaves the
choice to the page's stylesheet, but a control's label (a button, link,
pressable or control role) is not selectable there either; a text's own runs
select with it. user-select="all" makes an element's text one unit, as CSS
UI 4 has it (a path, a device code): on the web and macOS one click in it
selects all of it, and a drag, a Shift-click
or Shift with an arrow that reaches into it takes it whole. On iOS a long
press or a double tap in it selects it instead of a word, and a tap selects
nothing, as on a UITextView; an element around one or more paragraphs selects
all of its paragraphs together. An inline run that says
all is selectable in text that is not (a label, a header), alone, on
all three. Text that presses (press=) still presses on each click or
tap; on macOS it does not select, and on iOS a tap while it holds a
selection clears the selection, as in a text view. On Android a long press on
user-select="text" selects a word. The handles adjust the selection within
one paragraph, and the floating toolbar offers Copy, Share and Select all.
An inline or enclosing all selects its text as a unit. Dragging the paragraph
away from a handle scrolls its container. On Linux and Windows, drag across opted-in text,
double-click a word, or triple-click a paragraph. One click selects a run marked all.
Ctrl+C copies the visible text when the host supplies a clipboard.
On tvOS, text and all leave their content unselected. contain is refused by
name: no native host has it. These rows take literals
or choices of literals, so unsupported runtime values cannot bypass the check.
Colours: say a role, not a value. Leave a colour unsaid where you can (text,
tint, page and sheet backgrounds, separators and controls are the platform's).
Where you must say one, name a role, which each host resolves to its own colour
for light, dark and Increased Contrast (labelColor on iOS, the browser's own on
the web; LLP 1095): CSS's system colours Canvas, CanvasText, LinkText,
GrayText, AccentColor, AccentColorText, Field, FieldText, ButtonFace,
ButtonText, Highlight, HighlightText (AccentColor and LinkText are the
tint: the nearest accent-color a node or an ancestor sets, else the platform's, as
UIKit's inherited tintColor is; AccentColorText is the ink on that accent, on the web
black or white by its lightness as a filled button's label), and Exact's -exact-label,
-exact-secondary-label, -exact-tertiary-label, -exact-quaternary-label,
-exact-placeholder, -exact-separator, -exact-opaque-separator, -exact-link,
-exact-symbol (what a symbol nobody tinted is, the initial -exact-tint-color:
the tint on iOS and the web, the secondary label colour on the Mac),
-exact-background, -exact-secondary-background, -exact-tertiary-background,
-exact-grouped-background, -exact-secondary-grouped-background,
-exact-tertiary-grouped-background, -exact-fill (and secondary-, tertiary-,
quaternary-), and the hues -exact-system-red, -orange, -yellow, -green,
-mint, -teal, -cyan, -blue, -indigo, -purple, -pink, -brown,
-gray (each -exact-system-…). color="-exact-secondary-label", not
color="#8e8e93"; border-color="-exact-separator", not a grey hex. Surfaces come
in pairs: a card on a plain page (-exact-background, or unsaid) is
-exact-secondary-background; on a -exact-grouped-background page it is
-exact-secondary-grouped-background (white in light mode on iOS and the web, so on a plain white page
it vanishes there; on the Mac both card roles are AppKit's under-page grey); a surface inside either card is its pair's tertiary role. A route whose
scroll is a grouped list (list appearance="auto", inset-grouped or grouped) is a
-exact-grouped-background page with nothing written, bar to bottom edge, so a switcher
or summary between its header and the list sits on the list's grey (LLP 1116.007 D5); a
background-color on the route, or on that content, wins. One on the list itself is its
ground around the cards, which keep theirs: transparent shows what lies behind it, such
as an aria-hidden svg at z-index=-1 (LLP 1084 §6.5). A brand colour
the platform has no role for is the one place for a literal. For custom Increased
Contrast variants on app tokens in app.forma, write when contrast=more: <value>
on the token (combinable with declared app axes such as when dark-style=dim contrast=more:;
contrast is a read-only host trait, so never declare it in axes, setMode, or -exact-mode).
On the web it lowers to @media (prefers-contrast: more) CSS custom properties; on native
hosts it follows the OS Increased Contrast preference automatically (LLP 1121 D5).
Type: say a heading, not a size. Body text is the platform's body size
already (the root font size: Dynamic Type's body on iOS, 13 on the Mac, the
browser's 16). A text role="heading" with no font-size or font-weight of
its own is the platform's text style for its aria-level (LLP 1115 D3): 1
title1, 2 (the default) title2, 3 title3, 4 and on headline. Apple's ramp
gives 28/22/20/17 pt at the iOS default, 22/17/15/13 pt on the Mac and
27/21/19/16 px at a 16 px web root. Android's Material look uses 28/24/22/16 sp
at a font scale of 1 (LLP 1115.001 D4). iOS, macOS and Material keep each style's
weight and leading. The web, neutral and terminal looks use bold for levels 1
and 2, semibold for 3. Omit heading sizes and weights unless customizing them.
An authored font, font-size or font-weight wins; an inherited one does not.
Native navigation bars and grouped-list headers own title spacing, and title
typography the author leaves unsaid. A font-family, font-weight, font-style
or font-size written on a bar's heading replaces that one part of the
platform's title font: on iOS in the navigation title (a level-1 heading's size
is the large title's, any other's the inline title's), on the Mac in a modal
route's sheet title. The Mac's window title keeps AppKit's font, which no public
API changes. A heading inside an iOS pressable title group takes the same
authored typography over the bar's headline font.
On an iOS route, set the inline and large title, text item and Back title fonts
through the header's font-family or through a Swift hatch, choosing one per route.
On iOS, a route's level-1 heading gives a large navigation title; other levels
give an inline title. Set UIKit's largeTitleDisplayMode through a native access
hatch to change presentation while keeping the semantic rank. Check the host's
implementation for its supported APIs.
Other text takes a style by name with font, as WebKit's
font: -apple-system-headline: font="-exact-footnote" (or
"-apple-system-footnote") sets the style's size and a normal font style, and
the style's weight and leading as each platform draws it (LLP 1115.000 D12.2:
the Mac's headline bold and its styles' own leading, 13/16 for body; iOS's the
face's own), beating an inherited weight or line height as CSS's shorthand
resets them. The styles are -exact-large-title, -exact-title1, -exact-title2,
-exact-title3, -exact-headline, -exact-body, -exact-callout,
-exact-subheadline, -exact-footnote, -exact-caption1, -exact-caption2;
font-size="-exact-caption1" alone sets the size and keeps an inherited weight
and line height, the style filling only what nothing above says.
font-size="min(-exact-subheadline, 31px)" grows with the text size up to its
cap, whether written literally or bound to a string, as UIKit's
UIFontMetrics.scaledFont(for:maximumPointSize:) holds one: for a
row of equal cells that must stay one line at the accessibility sizes (a week's
day numbers, which UIKit's calendar caps at 31 points), never to shrink text. A weight or
line height written on the node wins either way, and layout names each one's
source (style, heading, inherited, authored). font takes nothing else
but inherit, the common reset's: a control's text then takes every font
longhand from the text around it.
Bold Text (iOS's setting, Android's font weight adjustment) weights the system
font one step heavier, a written weight included, as a hand-built app's text
is, and leaves a family the app names alone: write the weight you mean, not one
you expect the setting to add (LLP 1115.000 D12.3). A drive turns it on, on
Apple, with prefer bold-text true.
A colour is any CSS colour the browser paints: hex, rgb(), hsl(), hwb(),
a named colour, transparent, lab()/oklch()/color() (clipped to sRGB
natively), or light-dark(a, b); the kernel parses it once for every host.
An app names its own colours once, in a root theme block, one
name="colour" line an entry: a colour, a role (card="secondary-grouped-background")
or another entry's name. A row writes the name as any colour, in every colour
row and inside shadows and gradients (color="brand",
box-shadow="0 1px 2px brand"), and a string from data naming it reads the same
colour. An entry named like a role (-exact-secondary-label, or LLP 1095 D4's
bare secondary-label, or Canvas) overrides that role where a row names it.
Cycles, and a name inside light-dark(), are refused (LLP 1095 D4).
An old design is refused with rename app.tamber to app.forma. Change its header
to forma <name> and its manifest's tamber key to forma too, if present.
The old CLI verb refuses with the command to use: bun exact.mjs forma.
An app with a brand, or modes the person picks, writes its design in
app.forma beside app.contract (or the file app.json's "forma" names)
instead (LLP 1121): a theme block of tokens (surface.card = light-dark(#f1f3f5, #16181c), written as CSS, dotted names allowed), and an
axes block of app modes (dark-style = black | dim under scheme=dark), each
token's value in a mode on its own when dark-style=dim: … line. Rows name a
token as they name a role, and an expression over tokens
(color-mix(in oklab, accent.fill 40%, surface.card)) is folded by the build,
written whole, in a choice's arm or inside a shadow; a mix of colours alone
(color-mix(in srgb, red 35%, transparent)) is a token in the theme block.
setMode("dark-style", "dim") sets the window's mode; -exact-mode="dark-style=black"
on a node holds its subtree in one (pins are axis=value, by spaces or commas;
axis:value is refused), and inherited text inside takes the pin's value. The
agent's prefer mode dark-style=dim sets it from a drive (the app's own
setMode still wins after it: an app that restores a kept mode at launch
overrides an earlier prefer, so prefer after clock data; a dev reload keeps
the window's mode unless the edit removed it), layout <id> shows
the token beside each row's value, and bun exact.mjs forma check | eval --mode … | ir | fmt checks the design, prints its tokens in a mode, writes its IR, or
puts it in its one layout (fmt --check changes nothing). The
rule: a role if the platform has one, a token if it is the brand. A token one
colour in every scheme by design (white ink on a brand fill, a black ground
under media) says so with scheme=fixed after its value (white_100 = #ffffff scheme=fixed), and lower-colour-one-scheme leaves it alone; an unmarked one
is reported once, at its line in the design. pair=surface.page after a
foreground's value names what it is drawn on (a token or a role);
contract forma check warns when the two fall below 4.5:1 (forma-contrast).
The brand's states come from the theme, not a hatch (LLP 1129): AccentColor = accent is the app's tint, so the keyboard's focus ring is drawn in it (on the web
a solid 2 px line, which reads on a control filled with the accent); Highlight
and HighlightText colour selected text on the web (iOS draws it in the tint); a
button you fill (background-color="accent") hovers in its own ink, as the
filled button does, and a row or card of your own (a link or a pressable)
hovers in the brand's colour by a :hover part; a sheet's corners are
border-radius on its route. A button
in the brand's shape is a face you write on a button with no buttonStyle; a
buttonStyle is the platform's control, which takes the accent and no radius
(lower-button-style), and ButtonText and LinkText are the tint's, not the
theme's (lower-theme-tint).
A type token is CSS font syntax (type.body = -exact-body/1.35 "InterVariable"):
font="type.body" writes only the longhands it names, so the text style's own
weight applies where it names none, and a size in px is warned of
(forma-type-fixed: it does not follow the person's text size). A family token
is a stack (family.text = "InterVariable", system-ui), named by font-family.
The checker validates family stacks in both token kinds even when no row reads
them. Unsupported generics such as cursive are refused at the token's value.
One that varies by a mode goes on the text, not its container
(forma-inherited-axis); on the JS target each row it writes is a property
per mode (--x-type-body-size).
A component declares what a designer may tweak in a params section (LLP 1121
D15), one param a line: radius: length = "radius.md" range="0..40" step=1 control="slider" group="Shape" priority=1 label="Corner radius". A param is a
token the component owns: its default is any token value (a literal, a token, or
an expression over tokens and the component's other params), and its rows and
defaults name it param.radius; a generated internal token name is refused
(forma-param-unknown). Every instance shares it. Its full name is the
component's declaring file and name, post.contract#PostButton.radius (an import
alias never changes it; moving the file makes it a new param), and
PostButton.radius where no other component has that name (a package's file
is its package's however a use reaches it). A param is a row's value in its
component's own rows (a style, shorthand or motion row, an image's symbol:
source): a string or a template, through ?: branches, match arms and +,
as a motion token is; and its defaults. Passed in a component's argument, it is
the child's row's value. One in a style that one component's view alone
applies is that component's (LLP 1139 D3); one in a style another
component applies too, a keyframes or a state's value,
or in what a row computes (a function's argument, a condition, a comparison,
a callback), or that a child reads otherwise than as a row's value, is refused
(forma-param-scope). A param no
row of its component reads (a state part's row counts: :active's
background-color = "param.pressed"), directly or through another param, is refused
(forma-param-unused); a ranged length is px (forma-range-unit), or a base
name or an expression over one, checked in every platform's column, and its
default must be inside the range in every mode; control follows the kind
(color, slider, stepper, token, select with options="a|b", none),
and priority is 1 to 3. A design token may not be named param.….
contract forma ir and the design server's describe list them under
components; contract forma check builds an app with params to admit its
design (a dial only a param reads is read), counts them apart, and charges a
refusal or warning on one to its default. A view that isn't Contract (a native module's, a Rust canvas
component) declares its params in the design instead: component MapCard, then
an indented params block of lines like a dial's, any kind (inset: length = 8px in 0..24 control=slider priority=2). Its identity is the design file
and the name (app.forma#MapCard); its declaration keeps every param, and
what its default reads, as the code reads them by name; a when is not the
component's (the app's design sets a param per mode).
The app sets a param's value in its
design's params block (PostButton.radius = 8px, when lines too), which
every instance shares; the design server's set-param writes it,
unset-param takes it back to the component's default, and a line naming no
param of the app is warned of.
A package can ship a design (LLP 1121 D11): a file named for the last part of
its package.json name (@exact/reading → reading.forma) beside its entry
file (what exports maps . to, else index.contract), or the file its
package.json "forma" names inside the package. It starts forma reading
and holds one theme block of tokens named reading.…, which the package's
views name. An app that uses the package gets them. The app's design sets one
by its full name (reading.card = #abcdef in app.forma), which replaces the
package's, when lines and all. A package's design may declare its
components' params (component Map with params, named
<package>/<file>#Map, as its Contract components are), whose values the
app's design sets (Map.pin = #000000 under params, or the full name). It
may declare icons (icons, reading.star = icon(sf "star", svg "star.svg")),
each named reading.… and naming only its own package's icons; the app's
design overrides one by full name under its icons, whole. An icon's SVG path
is relative to the assets/ of the root whose file writes it: the app's
directory for the app's, the package's root for a package's (an icon's, or a
param default's icon(svg …) in its design or its Contract), so a package
whose "forma" is theme/palette.forma still reads <package>/assets/; in v1 it must be a one-colour template
(forma-icon-svg). It declares no axes, dials, params lines or exports
(forma-package-block; its when lines name the app's axes), declares only reading.… names and none of the
base names (forma-package-name), and a token in it names only tokens the
same file declares, roles, and the base names space.xs…space.xl and
radius.sm…radius.full, which the app's design defines until the base scale
ships (forma-unknown-token). An app can't use two packages whose names end
alike (@acme/reading and @other/reading) when both ship a design. A
refusal points at its line in the package's file. contract forma check|eval|ir|gen and the design server fold the app's design with its
packages' tokens, as the build does.
A length token may name a base name bare (card.pad: length = space.md) or in
a calc(), min(), max() or clamp() with px and numbers
(calc(space.md * 2 + 4px)): each host reads it in its own column, and the
compiler checks every column, naming the one a row refuses (a padding that is
negative on mac). A shadow token's lengths may be any of these
(card.shadow: box-shadow = 0 space.md calc(space.sm * 2) black), checked in
every column the same way (a blur negative on mac is refused); a literal
box-shadow row's lengths stay px, so name a shadow token there. A base name
times a length, and rem, em or % beside one, are refused.
A row's own value may be a calc(), min(), max() or clamp() over length
tokens (margin-top="calc(var(--space-2) * -1)", or calc(space-2 * -1)):
each token is read where the row is drawn, so a rem token stays rem and
one that varies by mode follows it. A value computed from state or data
names a token only whole.
A package that is "private": true and ships a design is a library (LLP
1139): each component its entry declares or re-exports is held to its rules.
Its spacing, corner and colour rows (a shorthand's each side; border's
colour), and its params' defaults of every kind, name a param, a token, a
role or a base name, or compute over one (color-mix, light-dark,
calc), never a literal (0/0px and CSS keywords such as auto and
transparent excepted; lower-library-literal); a control's role is the native control's (input,
textarea, select, progress, a native button) with what its platform
needs (checked and aria-label or aria-labelledby, a range's
min/max, …;
lower-library-control); each of its buttons (a button, or a node of
role="button") is named, by aria-label, aria-labelledby or a text of
its own, and one whose look reads a state prop (a bool named selected,
current, pressed, checked, on, active or expanded, in a ?:,
match or class) says it aloud through aria-selected, aria-pressed,
aria-current, aria-checked or aria-expanded, or a label that reads it
(also lower-library-control; any other bool, a size or an ink, is
presentation); and nothing in the package reads the host it runs
on (exactDelivery, exactSurface, exactViewport().displayMode read
from the viewport wherever the package passes it: an alias, a provide, a
fn; a prop's displayMode is the app's data; lower-library-platform). Not checked yet: an injected value whose
provider is outside the package, and per-platform host entries (no syntax
for them). A field names its active option with aria-activedescendant
(combobox recipe). Its names are its API: an app line or a Contract row naming a
name under its namespace that it doesn't define, or a param line naming one
it lacks, fails the build (forma-package-unknown; the nine base names are
no package's), and its params are named in full, a short name that names
none too (forma-param-short-library). The in-repo @exact/actions'
BarItem and HeaderButton are for an app's own authored bar and header (a
design's, as Bluesky's are); the platform's tabs and header routes stay
the platform's, and no library component wraps them. A BarItem says its
selection as the bar's current item (aria-current="page", iOS's selected
trait) and takes no long press itself: an item held for more puts
contextmenu on its slot fill (Bluesky's Profile avatar), so the press lands
on the fill rather than the whole column.
@exact/actions also exports FollowButton (id, following, text, label, tone, size, shape, icon, press), a person's Follow button (Bluesky's
FollowButtonInner), an authored pressable under D9's exception as
PostButton is. Its variants are Bluesky's own: tone "primary",
"inverted", "subtle" or "overlay"; size "small" or "tiny";
shape "pill" or "round" (icon only); icon "both" (plus, then a
check once following), "follow", "following" or "none". Its words are
yours: text is the visible label (Follow, Follow back, Following) and
label the spoken one ("" speaks text). It says following by its label
alone, with no aria-pressed, so swap both with the state; a round one shows
no text, so give it a label in both states ("Follow Ada", "Following Ada"), which the compiler can't check. Each tone's fill and text, not
following and following, are params (fill, ink, followingFill, …,
overlayFollowingInk) over actions.follow-* tokens, its sizes are tokens,
and its press scales are params, one for a small pill, a tiny one and a
round one.
The in-repo @exact/cards exports PostCard, AtCard, ProfileHeader (and its
ProfileAlert shape), Avatar (src, size), VerifiedBadge (badge, size, ink, mark) and PersonRow; badge is enum<"none", "verified", "verifier"> (as
ProfileHeader's and PostCard's), "none" drawing nothing. It was a string
with "" for none until stage 15 B batch 2: pass "none" now, and a data
value of that enum type. PersonRow (id, label, avatar, name, handle, badge, pill, description, descriptionLines, divider, disabled, press) is a
person in a list (Bluesky's ProfileCard), its one slot the trailing control
(a FollowButton, your own, or nothing). Its one press target is the link,
everything but the slot (role="link", testId <id>-link, label its
spoken name, such as "View Ada's profile"); the slot is a column beside it at
the trailing edge, never in it, so the trailing control stays its own to a
screen reader, and the pill and description run under the names;
handle is the second line as shown ("@ada.bsky.social"), pill the
pill's text ("" for none), divider "bottom", "top" or "none";
disabled dims the link (not your trailing control) and says so on it (aria-disabled) but doesn't stop press, so check in your
action. Avatar's and VerifiedBadge's size, and VerifiedBadge's
ink and mark, have no defaults: pass token or role names
(size="cards.avatar", ink="cards.badge", mark="cards.badge-mark", or
your own), not literal colours, so setting those tokens restyles them.
@exact/cards also exports EmptyState (id, icon, iconSize, tone, title, message, button, buttonLabel, buttonIcon, buttonTone, press), what a list
shows with nothing in it: every text is yours, and an empty icon, title
or button leaves that piece out (icon and buttonIcon are image sources,
a symbol: name or an icon token). The three enums are required, with no
defaults: iconSize "medium" (48 points, Bluesky's usual), "small" (32)
or "large" (64) in a 64-point box; tone "high" (the message in the
label colour), "medium" (secondary) or "label" (message and icon in the
label colour); buttonTone "primary" (the brand blue) or "secondary".
@exact/lists exports MenuItem (id, label, icon, destructive, first, pick) and MenuGroup (a slot of items): a menu's drawn items in a
sheet, as Bluesky's menu is, not the platform's list cells; the sheet holding
the groups is yours and carries role="menu" (the items are menuitems, the
group adds no role). Pass first=true on a group's first item, which has no
hairline above it.
The in-repo packages' icons are icon tokens, which an app overrides by full
name: @exact/cards' cards.repost, cards.pin, cards.corner-down-right
(PostCard's context and reply lines), cards.ban, cards.eye-slash,
cards.warning, cards.circle-info (ProfileHeader's alerts), cards.attie
(AtCard's visit button) and cards.verified, cards.verified-check,
cards.verifier, cards.verifier-check (VerifiedBadge), and @exact/actions'
actions.reply, actions.repost, actions.heart, actions.heart-filled,
actions.bookmark, actions.bookmark-filled, actions.share, actions.dots
(ActionRow), actions.gallery, actions.camera, actions.gif
(ComposeFrame's toolbar) and actions.follow-add, actions.follow-check
(FollowButton). Each but FollowButton's two has no sf, so Apple draws the
same path as the web; those two name SF Symbols' plus and checkmark
beside Bluesky's paths, so Apple draws the symbols (as some of the clone's
copies did; a copy that drew a path there changes, a named pixel change). The Attie mark, the toolbar's three and the badges' paths were inline
svg with fill-rule="evenodd"; each one's holes wind against its outline, so
it fills the same nonzero, and its SVG has no fill-rule (an even-odd icon
gives its app a new compat id). A badge is two one-colour templates stacked,
its ground in its ink and its check in its mark, so both colours stay a
card's tokens and a header's params; an override replaces one layer, its colour
unchanged. Still paths: BarItem's and HeaderButton's icons, which are their
caller's d (a prop), not the package's.
Code outside a view names a token by its name too (LLP 1121 D12): a data module
returns a ColorToken (or a LengthToken, TypeToken, … of its kind:
contract types declares the design's, so an unknown one fails tsc), and bun exact.mjs forma gen ts|rust|swift|kotlin . writes bindings into
.exact/forma/ (never committed): forma.ts and forma.css (each token's
CSS per mode), forma.rs (pub const SURFACE_CARD: Token<Color>, and
Token<Length>, Token<Number>, Token<Type> for those kinds, which
session.forma().get(SURFACE_CARD, place) resolves in a running session), or
forma.swift (ExactFormaToken.surfaceCard, for a native view's
ExactForma(view).color(.surfaceCard), .length(_:), .number(_:) and
.font(_:fallback:), a font at the person's text size with Bold Text's step),
or FormaTokens.kt (FormaColor.SURFACE_CARD, FormaLength,
FormaNumber, for ExactForma(view).color(…) in the app's hatches). A
component's param is named by <Component>.<param> there (mapCardInset,
MAP_CARD_INSET); two names that map alike are refused, naming both. The Apple
build writes forma.swift and the Android reader's FormaTokens.kt before
an app's modules compile.
Recipe:
a brand.
color-scheme="dark" (or "light") on a node makes that subtree resolve
light-dark(), platform colours and glass in that scheme, as a sheet that is
always dark does; leave it off to follow the surrounding scheme (LLP 1034 §8).
A Theme setting calls setScheme("light" | "dark" | "system") in its action; the
choice is kept across launches and shown from the first frame, and "system"
forgets it.
An app that is always one scheme says "userInterfaceStyle": "light" or "dark" in
app.json (automatic, the default, follows the device). It is the app's appearance from
launch, as the device's would be: the launch screen, the first frame, sheets, alerts and the
keyboard are in it, prefers-color-scheme reads it, setScheme("system") returns to it, and
a drive's prefer prefers-color-scheme leaves it. A node's color-scheme still wins in its
subtree. iOS and tvOS write UIUserInterfaceStyle; macOS sets the application's appearance
before its first window; the web page declares it in its color-scheme and <meta name="color-scheme"> before the first paint. Android, Linux and Windows follow the device.
status-bar-style="light-content" (light text, for a dark surface),
"dark-content" or "auto" on any node, bound to state, sets an iOS or Android phone's
status bar: of what the bar sits over, the declaration painted on top wins.
auto follows the winner's color-scheme, else the page's scheme; without a valid
declaration iOS follows the page's scheme. Android resolves navigation-bar-style for navigation icons in the same scope, independently.
Without an explicit icon style, each Android system bar follows its projected header’s or root tablist’s ink, then the page’s scheme (LLP 1105 D7).
The element’s background-color fills the bar through the system band. Its color supplies the title, Up arrow, action icons and unselected destinations, defaulting to black or white on an authored background and to the device roles otherwise. On Android, the root’s accent-color seeds Material’s tonal-spot colours for the indicator, selected symbol and label, and enabled, untinted text actions; the design’s AccentColor seeds the whole scheme in place of the device’s palette (LLP 1115.001 D4). With gesture navigation, Android can choose the
handle colour from what the page actually paints. Android's modal routes are
pages that cover the bar; native sheet detents and transition completion are not
available there (see host/android/README.md, Edge to edge). On iOS a flip shows in
its batch's frame after navigation settles, and status-bar-animation="fade" fades
it. Android ignores the animation; other hosts ignore both properties.
system-bars-hidden=true on any node, bound to state, hides an iOS phone's
status bar and auto-hides its home indicator (it fades after a few seconds
without a touch, and a swipe still goes home): a full-screen game or toy. It
resolves as status-bar-style does, apart from it: a fullscreen route's
declaration wins over the stack under it, a sheet at medium leaves the bars
to the screen behind, and false is a declaration too, so a descendant's
false shows the bars its ancestor hides. A change waits for a push or a
presentation to land. The status bar hides and shows at once unless the
winning declaration has status-bar-animation="fade" (when none wins any more,
the one that went); a style change still fades by its own winner's. On a phone with no notch or Dynamic Island the status bar's 20 pt
leave the safe area, so the content of a route moves up to the screen's top;
elsewhere the top inset stays, as the home indicator's does at the bottom, and
nothing moves: a route whose content must reach the screen's edges (the game's
canvas) takes -exact-safe-area="none" and places its controls with
var(--exact-safe-area-inset-*). On Android it hides the
status and navigation bars (immersive mode): a swipe from the screen's edge
shows them over the page for a moment, and the safe area loses the bars'
insets (the display cutout's stay), so content laid out against it moves into
the space they left. It resolves by the same rule, with Android's modal routes
covering pages (host/android/README.md, Edge to edge), and changes with
committed state; status-bar-animation does not apply there: the system
animates its own bars. Other hosts ignore it.
wakelock="screen" on any node, bound to state (wakelock=(playing ? "screen" : "none")), keeps the display awake while that node is displayed; a hidden or
unmounted one holds nothing (LLP 1125 D11; state.wakelock is {held, by}).
orientationlock on any node (orientationlock=(tilt ? "current" : "none"))
keeps the window to a Screen Orientation API lock type, or current, while
that node is displayed; a sheet's lock wins over what it covers and a
descendant's over its ancestor's. A type only narrows the manifest's
orientation, and a lock inside a dialog is refused (LLP 1133.029;
contract vocab orientationlock).
currentcolor takes the node's color on borders, background-color,
-exact-tint-color, text stroke and SVG paint. unset clears any row, and inherit
an inherited one (color, fonts, fill…); inherit on a row CSS does not
inherit is refused. order places flex and grid items. An image's accessible
name is alt or aria-label; enterkeyhint labels a soft keyboard's enter
key on the web, iOS and Android; in a textarea that key is Enter, a new line
unless a key handler prevents it (on Android only where the hint names an action:
a textarea with no hint, or enter, breaks the line itself). A bare number on a length row is pixels (except
line-height, where it is CSS's multiple of the font size), and the row takes
CSS's spellings too (font-size="14px", letter-spacing="-0.5px",
padding="1.5rem"; stroke-width="2px" but no rem there), bound or literal
(font-size=`${size}px` ). A separator's thickness is -exact-hairline, one
device pixel on whatever display the app is on (a third of a point on a phone,
half on a Retina Mac, a pixel on a 1x screen), where 0.5 is one only at 2x:
border-bottom="-exact-hairline solid -exact-separator", or hr, which is that
line with no margin of its own (space around it is the gap or margin you
write). Between the rows of a list write neither: its children are rows, and
the separator there is the platform's (LLP 1115.000 D16). A row whose value is a number and no text
(opacity, flex-grow, font-weight, column-count,
column-rule-width) takes a number where it is computed: a string-typed
expression there is refused, since the native hosts read no text on it (the
literal keywords and px of column-count and column-rule-width compile to
their numbers). z-index takes an integer or "auto", its initial value, including in
a conditional (z-index=(lifted ? 2 : "auto")). An applicable integer,
including zero, makes a stacking context; auto does not. Nonzero values
stay within their parent's paint turn on every host (LLP 1083.000 §3.1).
max-width and max-height take none, CSS's initial maximum, or auto, and the web writes
none for either. A number field's (input type="number", written so)
min, max and step take numbers, as a range's do; its value is its text.
On the Mac, Up/Down and accessibility increment/decrement step the number even with
appearance="textfield". Apple number fields filter typing and paste while keeping signs,
fractions, exponents and input-method composition; inputmode alone does not filter text.
autocomplete on an input or textarea is HTML's attribute, written as
HTML writes it (autocomplete="username", "section-login current-password",
"shipping postal-code"). The web sets it as written. iOS and macOS read its
last field name (a trailing webauthn aside) as the field's AutoFill content
type, over the one type implies (iOS: password, email): username,
current-password, new-password, one-time-code, email, tel, url,
name, given-name, additional-name, family-name, honorific-prefix,
honorific-suffix, nickname, organization, organization-title,
street-address, address-line1, address-line2, address-level1…3,
postal-code, country-name, cc-name, cc-given-name,
cc-additional-name, cc-family-name, cc-number, cc-exp, cc-exp-month,
cc-exp-year, cc-csc, cc-type, bday, bday-day, bday-month and
bday-year.
macOS 26 offers verification codes from Messages and Mail in every text field;
app.json's host.macos.oneTimeCodeAutofill: "marked" keeps them to fields
marked one-time-code.
off clears the content type (the web's autocomplete="off"); on or a
list HTML's grammar refuses (the web's default) leaves type's, and so does
a name the platform has no type for (country, impp, sex), which only the
web can act on.
On iOS, setting both autocorrect="off" and spellcheck=false hides the
QuickType suggestion bar above the software keyboard; autocorrect="off" alone
clears suggestions while leaving the empty strip. UIKit has no public API to
hide the QuickType bar while keeping autocorrection (inlinePredictionType
toggles only inline ghost completions inside the field). Setting
writingsuggestions=false (or writingsuggestions="false", inherited from an
ancestor as in HTML) disables Writing Tools (writingToolsBehavior = .none)
and inline predictions (inlinePredictionType = .no) on iOS and macOS, while
leaving unsaid fields at the platform default.
An input type="password"'s value is never agent output, on any host: tree,
layout <field> and the type reply show value="•••" for any value that is
not empty, whatever its length (an expect text on the field reads •••), and
tree --ax marks the field protected where the host has one (the web's
accessibility tree still shows one bullet a character, as Chrome exposes it).
state shows "•••" for any string equal to a live password field's text, in
its slots, derives and answers alike; an expect state and a drive's clock until state compare against the text and print it masked. What the app stores (its data
module, its store) is the app's own; an app.test.contract type … append into a
filled password field is refused.
aria-busy=(not ready) marks a region as loading for assistive technology.
The launch ledger used by modules/observe waits for busy elements before
recording time to interactive. On Apple and the JavaScript web target, a
mounted busy element holds clock settle, including inside a closed dialog.
An indeterminate progress implies aria-busy. The settle reply names each
busy element by test ID or view ID. Use layout <id> to find its source line in
a development build. Use clock +1 to run a task due a commit later while
settle is blocked.
border, border-top/right/bottom/left take CSS width/style/color in any order,
resetting omitted components to medium/none/currentcolor. Widths are px/pt,
unitless zero, or thin/medium/thick (1/3/5 px); styles are none/hidden/solid/inset/dotted/dashed.
The web and native GUI hosts paint dotted and dashed while keeping their widths.
At 1×, AppKit and Linux dot and curved-join pixels have a bounded raster
difference from Chrome. UIKit uses AppKit's painter; its simulator parity is
still unmeasured (LLP 1001, border semantics).
Other CSS border styles are diagnosed as native painter gaps. text-decoration
takes none, underline, line-through, or both lines; solid/currentcolor/auto
components retain the supported defaults. Color/style/thickness extensions are
refused by name. Linux paints solid lines with UA metrics and diagnoses its
missing underline skip-ink behavior in the driver log.
A flex shorthand's grow/shrink factors must be adjacent. width, height,
their minimums and maximums take min-content, max-content and
fit-content, and flex-basis (and flex's basis: flex="max-content" is
1 1 max-content) takes those and content, laid out as Chrome lays them out
on every host (LLP 1001.001). width="fit-content" is as wide as the content,
up to the space the box has and no narrower than its longest word: a badge or a
card that hugs its text without a flex row around it. max-content is the
content on one line, min-content as narrow as its longest word, and
max-width="max-content" caps a stretched box at its content. A keyword height
is the content's height, but a flex or grid item with one no longer stretches.
fit-content(<length>) (Chrome takes it only in a grid track), stretch, the
-webkit- aliases and calc-size() are refused by name.
Font lists distinguish quoted local names from unquoted CSS generics. The eight
mapped generics are system-ui, ui-sans-serif, sans-serif, ui-serif, serif,
ui-monospace, monospace and ui-rounded. Other CSS generics and CSS-wide
font-family values are refused with the native mapping/stack representation
reason, rather than being silently treated as local family names.
CSS escapes and literal double quote characters at the start or end of a family
name are not implemented. Apostrophes and interior double quotes are supported
inside a name quoted with the other quote character.
Is this helpful
Last updated November 30, 2026