Expand description
Flow layout, also known as block-and-inline layout.
Modules§
- Float layout.
- Inline Formatting Context Layout
- root 🔒
Structs§
- The contentes of a BlockContainer created to render a list marker for a list that has
list-style-position: outside
. - State that we maintain when placing blocks.
Enums§
Functions§
- Finds the min/max-content inline size of the block-level children of a block container. The in-flow boxes will stack vertically, so we only need to consider the maximum size. But floats can flow horizontally depending on ‘clear’, so we may need to sum their sizes. CSS 2 does not define the exact algorithm, this logic is based on the behavior observed on Gecko and Blink.
- This is supposed to handle ‘justify-self’, but no browser supports it on block boxes. Instead,
<center>
and<div align>
are implemented via internal ‘text-align’ values. The provided free space should already take margins into account. In particular, it should be zero if there is an auto margin. https://drafts.csswg.org/css-align/#justify-block - Lay out a normal flow non-replaced block that does not establish a new formatting context.
- Resolves ‘auto’ margins of an in-flow block-level box in the block axis. https://drafts.csswg.org/css2/#normal-block https://drafts.csswg.org/css2/#block-root-margin
- Given the style for an in-flow box and its containing block, determine the containing block for its children. Note that in the presence of floats, this shouldn’t be used for a block-level box that establishes an independent formatting context (or is replaced), since the inline size could then be incorrect.
- Resolves ‘auto’ margins of an in-flow block-level box in the inline axis similarly to |solve_inline_margins_for_in_flow_block_level|. However, they align within the provided rect (instead of the containing block), to avoid overlapping floats. In addition to the used margins, it also returns the effective margin-inline-start (see ContainingBlockPaddingAndBorder). It may differ from the used inline-start margin if the computed value wasn’t ‘auto’ and there are floats to avoid or the box is justified. See https://github.com/w3c/csswg-drafts/issues/9174
- Resolves ‘auto’ margins of an in-flow block-level box in the inline axis, distributing the free space in the containing block.
- Given the containing block and size of an in-flow box, determine the margins. Note that in the presence of floats, this shouldn’t be used for a block-level box that establishes an independent formatting context (or is replaced), since the margins could then be incorrect.