LayoutChild Class

A child of a layout API container (https://drafts.css-houdini.org/css-layout-api-1/#layoutchild): an in-flow box, before its layout. The layout callbacks get the children of the box, read their styles, ask for their intrinsic sizes and lay them out.

public sealed class LayoutChild

Properties

NameDescription
StyleMapGets the computed values of the childInputProperties of the layout class for the child (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-stylemap).

Gets the computed values of the childInputProperties of the layout class for the child (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-stylemap).

public StylePropertyMapReadOnly StyleMap { get; }

Methods

NameDescription
IntrinsicSizes()Asks for the border-box min-content and max-content contributions of the child (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-intrinsicsizes): the task is completed when the layout runs its work queue.
LayoutNextFragment(LayoutConstraintsOptions?, ChildBreakToken?)Lays out the child with the given constraints (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-layoutnextfragment): the task is completed with the fragment when the layout runs its work queue.

IntrinsicSizes()

LayoutApiObjects.cs

Asks for the border-box min-content and max-content contributions of the child (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-intrinsicsizes): the task is completed when the layout runs its work queue.

public Task<LayoutIntrinsicSizes> IntrinsicSizes()

Returns

Task<LayoutIntrinsicSizes> A task that fails with an InvalidStateError DomException when the child does not belong to the layout that is running.

See also

LayoutNextFragment(LayoutConstraintsOptions?, ChildBreakToken?)

LayoutApiObjects.cs

Lays out the child with the given constraints (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutchild-layoutnextfragment): the task is completed with the fragment when the layout runs its work queue.

public Task<LayoutFragment> LayoutNextFragment(LayoutConstraintsOptions? constraints = null, ChildBreakToken? breakToken = null)

Parameters

constraints LayoutConstraintsOptions?
The constraints, in the writing mode of the layout API container.
breakToken ChildBreakToken?
The break token of the previous fragment of the child, or null for its first fragment.

Returns

Task<LayoutFragment> A task that fails with a DomException: an InvalidStateError when the child or the break token does not belong to the layout that is running, a NotSupportedError in the intrinsicSizes() callback, a DataCloneError when the data of the constraints cannot be cloned.

See also