Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
FlexBox
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\HtmlToPdf\Box;
6
7/**
8 * A box that establishes a flex formatting context — `display: flex`
9 * (block-level) per CSS Flexible Box Layout 1 §3.
10 *
11 * Implemented surface (see `BlockLayout::layoutFlexBox`):
12 *
13 *  - `flex-direction`: row / row-reverse / column / column-reverse.
14 *  - `flex-wrap`: nowrap / wrap / wrap-reverse, including the §9.6
15 *    single-line cross-stretch rule.
16 *  - `flex-grow` / `flex-shrink` / `flex-basis` resolved via the
17 *    §9.7 "Resolve the Flexible Lengths" iterative algorithm with
18 *    min/max main clamps.
19 *  - `order`-based item reordering (stable on document order).
20 *  - `justify-content`: flex-{start,end}, start, end, left, right,
21 *    center, space-between, space-around, space-evenly (mirrored
22 *    under reverse direction).
23 *  - `align-items` / `align-self`: flex-{start,end}, start, end,
24 *    center, stretch (cross-axis fills line extent).
25 *  - `align-content`: stretch / center / flex-{start,end} /
26 *    space-{between,around,evenly} across multiple flex lines.
27 *  - `column-gap` / `row-gap` per Box Alignment 3 §8.1 axis pick;
28 *    percentage gaps resolve against the container's content box.
29 *  - `flex-basis: auto` + `width: auto` → max-content per §9.2.
30 *  - `min-{width,height}: auto` floors at min-content per §4.5.
31 *  - Absolutely-positioned children are removed from the flex
32 *    flow and laid out against the flex container as positioned
33 *    ancestor per §3.
34 *  - Items resolve percentage heights against the flex container's
35 *    declared height (not the outer CB).
36 *
37 * Deferred: baseline alignment, intrinsic-aspect-ratio transfer.
38 */
39final class FlexBox extends Box {}