Optional ReadonlyalignCross-axis distribution of wrapped lines.
Optional ReadonlyalignCross-axis placement of children.
Optional ReadonlyalignThis node's own cross-axis placement.
Optional ReadonlyaspectWidth divided by height, honoured when one axis is automatic.
Optional ReadonlybackdropA CSS filter applied to what shows through this node.
Optional ReadonlybackgroundThe box's fill, distinct from Style.color, which is the text colour. The two sit adjacent and mean different things; that is CSS's trap, and keeping its names is what lets a design be ported without translation.
Optional ReadonlybackgroundA picture painted over the gradient.
Optional ReadonlyborderBorder thickness, which occupies space whether or not it is painted.
Optional ReadonlyborderBorder colour, on every edge or per edge. One property here; the encoder routes the scalar form and the edge form to the scene's two fields.
Optional ReadonlyborderCorner radii.
Optional ReadonlyborderHow the border is drawn. Defaults to 'none', which draws no border and
reserves no space for one however wide Style.border is.
One style for all four edges, where Style.border and
Style.borderColor are per-edge. CSS has four border-*-style
longhands and this has none, so a border drawn on three edges is spelled
through the widths — border: { right: 4, bottom: 4, left: 4 } — rather
than by turning one edge's style off. Measured: an omitted or zero edge
draws nothing and reserves nothing, which is what 'none' does for the
whole node.
So the capability is there and the spelling is not uniform: borders come on with a style and one edge goes off with a width.
Optional ReadonlyboxShadows cast by the box, nearest first: one or many, with later shadows drawn behind earlier ones, as CSS orders them.
Optional ReadonlyboxWhether width and height include padding and border.
Optional ReadonlycolorThe colour glyphs are drawn in, CSS's color. Inherits.
On an Image it is the tint an SVG source resolves currentColor
against, read from the node itself rather than inherited — a browser
passes a page's color into inline SVG and not into an <img>, and this
is the second kind.
So one property has two behaviours, decided by the element: it inherits into text and does not cross into an image's document. That is CSS's own rule rather than an inconsistency here, and it is the kind of thing a later reader tidies into consistency and breaks.
It recolours a document authored for currentColor and leaves a
hardcoded fill alone: an icon whose paths say fill="currentColor"
takes this colour, one whose paths say fill="#000000" stays black, and
neither is an error. Set on a raster source it is an error, raised
when the image is drawn: a bitmap has no currentColor, and ignoring the
request would be the silent wrong picture.
Image({ src: 'star.svg', width: 40, height: 40, color: '#e8c07a' })
Optional ReadonlycolumnsA shorthand for that many equal columns: columns: 3 is
gridTemplateColumns: ['1fr', '1fr', '1fr'] and reaches the renderer as
exactly those tracks, so a failure reading them names gridTemplateColumns.
Naming both this and Style.gridTemplateColumns is refused rather than resolved by precedence: a caller who wrote both meant one of them, and nothing here can tell which.
Optional ReadonlydirectionInline direction, which decides which edge is the start. Absent takes the parent's,
as CSS's direction inherits, and a page that states none is ltr.
Optional ReadonlydisplayHow this node's children are arranged.
Optional ReadonlyditherWhether gradients are dithered.
Optional ReadonlyfilterA CSS filter applied to this node's own drawing.
Optional ReadonlyflexSize along the main axis before growing or shrinking.
Optional ReadonlyflexThe axis children run along.
Optional ReadonlyflexShare of free space this node absorbs.
Optional ReadonlyflexShare of overflow this node gives up.
Optional ReadonlyflexWhether children overflow onto further lines.
Optional ReadonlyfontThe family name text is drawn in. Inherits.
Optional ReadonlyfontEm size in logical pixels. Inherits.
Optional ReadonlyfontUpright or italic. Inherits.
Optional ReadonlyfontOpenType features applied to the run.
Reaches the measurer as well as the painter: diagonal-fractions
moves a nineteen-character sample from 220.61 to 211.04, so a feature that
only reached the drawing would lay text out at one width and paint it at
another.
Optional ReadonlyfontWeight from 1 to 1000. Inherits.
Optional ReadonlyframeWhich frame of an animated source to draw, counting from zero. Read only by an image.
A negative index counts from the end, so -1 is the last frame. A source with
one frame ignores the index, and an index past either end of an animated
source rejects the render naming the index and the frame count.
Optional ReadonlygapSpace between children. One value for both axes, or each named.
row is the gap between rows, so it separates children stacked
vertically -- the axis names the gap it opens, not the direction it runs.
Optional Readonlycolumn?: Length | undefinedSpace between columns, separating children placed side by side.
Optional Readonlyrow?: Length | undefinedSpace between rows, separating children stacked vertically.
Optional ReadonlygradientA gradient painted over the background colour.
One kind per geometry, each carrying only what it reads.
Optional ReadonlygridBoth axes at once, as CSS's grid-area orders them.
[rowStart, columnStart, rowEnd, columnEnd], lines counting from one and
the two ends exclusive — [1, 1, 3, 2] is the item covering rows 1
and 2 of column 1, which is CSS's reading of grid-area: 1 / 1 / 3 / 2.
Sugar over Style.gridRow and Style.gridColumn, so it adds
nothing to the wire.
Naming this beside either of those is refused, for the reason Style.columns is.
Adding nothing to the wire means it has no identity there either, so a
failure reading a placement names gridColumn or gridRow — the axis it
was reading — rather than the shorthand that supplied it.
Optional ReadonlygridSize given to columns the template does not name.
Optional ReadonlygridThe order auto-placement fills tracks in.
Optional ReadonlygridSize given to rows the template does not name.
Optional ReadonlygridWhere this item sits on the column axis.
Optional ReadonlygridWhere this item sits on the row axis.
Optional ReadonlygridThe grid's column tracks, under CSS's name so a design ports without
translation. In one flat style a shorter name would sit beside padding with
nothing saying which box model it belongs to.
Optional ReadonlygridThe grid's row tracks.
Optional ReadonlyheightRequested height.
Optional ReadonlyjustifyMain-axis distribution of children.
Optional ReadonlyjustifyInline-axis placement of grid items and block children. Absent is CSS's initial
legacy: an ancestor's legacy left, legacy right or legacy center if one
reaches this node, and otherwise normal.
Optional ReadonlyjustifyThis node's own inline-axis placement. Absent is CSS's auto, the parent's justifyItems.
Optional ReadonlyletterSpace added between characters. Inherits.
Optional ReadonlylineExtra space between lines, in pixels. Inherits.
Optional ReadonlylineHow tall a line box is. Inherits.
A number is a multiple of the font size and is recomputed by whoever
inherits it; '24px' is an absolute height and descends unchanged;
'150%' is a share of this element's size, resolved here and
inherited as the length it comes to. Leaving it out is CSS's normal,
which is not the same as 1.
Optional ReadonlymarginSpace outside the border.
Optional ReadonlymaskWhat of the node is drawn.
Covers everything the node renders — background, border, content and
children alike — as CSS's mask does, rather than only its contents.
Applied within the node's own box, so content pushed outside by
Style.transform is not masked back in.
Optional ReadonlymaxUpper bound on the height.
Optional ReadonlymaxUpper bound on the width.
Optional ReadonlyminLower bound on the height.
Optional ReadonlyminLower bound on the width.
Optional ReadonlymixHow this node composites onto what is beneath it.
Optional ReadonlyobjectHow an image fills its box.
Read only by an image, as CSS's object-fit applies to replaced elements
and is inert on everything else.
Optional ReadonlyobjectWhere the image sits in its box when it does not fill it.
CSS's object-position, as a horizontal and a vertical offset. Absent
centres it, which is CSS's own initial value and what the Rust surface
writes. Read only by an image.
Optional ReadonlyopacityOpacity of this node and its subtree, from 0 to 1.
Optional ReadonlyoverflowClipping behaviour, on both axes.
Optional ReadonlypaddingSpace inside the border.
Optional ReadonlypaintWhich of a glyph's fill and stroke is on top. Inherits.
Optional ReadonlypositionOffsets from the container's edges.
Optional ReadonlypositionWhether the node is placed by the flow or by its own offsets. Named
positionType because position is the offsets.
Optional ReadonlytextHow lines sit within the text box. Inherits.
Optional ReadonlytextA line through, over or under. Inherits.
Optional ReadonlytextShadows cast by the glyphs, nearest first.
Distinct from Style.boxShadow: this follows the letterforms and that follows the border box.
Optional ReadonlytextAn outline drawn along the glyph edges. Inherits.
Optional ReadonlytransformMoves, turns and scales the node after it is laid out.
Applied about Transform.originX and Transform.originY,
which default to the middle of the box. Layout does not see it: a
transformed node still occupies the space it was given, as CSS's
transform does.
Optional ReadonlyverticalWhere a line sits within its box. Inherits.
Optional ReadonlywidthRequested width.
Optional ReadonlywordSpace added between words. Inherits.
Optional ReadonlyzPaint order among positioned siblings.
Everything a node can be styled with.
Flat, as CSS is flat and as the Rust
Styleis: a reader never has to know which groupgaplives in versusbackground. The renderer keeps the four groups because the wire format needs them separated.