1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Inner formatting context of a box — how a box arranges its own children.
//!
//! Independent of the outer display role (see
//! [`OuterDisplay`](crate::layout::OuterDisplay)): a flex container is
//! [`FormattingContext::Flex`] regardless of whether its outer role is block
//! (`display: flex`) or inline (`display: inline-flex`). Browser engines treat
//! the two axes as orthogonal; this enum encodes the same separation.
//!
//! ## Variants and their implementations
//!
//! - [`FormattingContext::Flow`] — Default block / inline flow. Implementation
//! lives in [`flow`].
//! - [`FormattingContext::Flex`] — CSS flexbox container. Implementation
//! lives in [`flex`].
//! - [`FormattingContext::Table`] — Internal table formatting context. Geometry
//! is assigned by the table algorithm.
//! - [`FormattingContext::Grid`] — CSS grid container. Lives in
//! [`grid`].
/// Formatting context established by a box for its children.
///
/// `Grid` is implemented by the CSS Grid formatting context in [`grid`].