wtf(css)layout you can see happening

CSS, with the layout showing

Forty steps through flexbox, twenty-two builds that fail unless several concepts are right at once, and the famous wtfs underneath — margin collapsing, stacking contexts, and the invisible wall inside every flex item. This is the one subject where the output IS the picture, so every problem is rendered rather than described.

Problems

28 problems
#titletopictypedifficulty
1display: flex changes the children, not the boxMaking a flex containerTeaching stepEasy
2flex-direction: column swaps which axis is whichMain axis vs cross axisTeaching stepEasy
3justify-content is the main axis, align-items is the cross axisAlignmentTeaching stepEasy
4align-items: stretch is the defaultAlignmentTeaching stepEasy
5align-self overrides the containerAlignmentTeaching stepEasy
6align-self works. justify-self does nothing.AlignmentTeaching stepMedium
7Where justify-content's free space wentAlignmentTeaching stepMedium
8justify-content distributes free space — and sometimes there is noneDistributing spaceTeaching stepEasy
9space-between vs space-around vs space-evenlyDistributing spaceTeaching stepMedium
10The centred box you cannot scroll toDistributing spaceTeaching stepHard
11flex-basis is the size before flexingSizingTeaching stepMedium
12The width that is being ignoredSizingTeaching stepMedium
13flex-grow distributes the surplus, not the containerSizingTeaching stepEasy
14Both panels shrink. One of them shrinks twice as hard.SizingTeaching stepHard
15What flex: 1 actually expands toSizingTeaching stepMedium
16flex: 2 deleted the flex-basis above itSizingTeaching stepMedium
17flex-shrink: 0 is defensive CSSSizingTeaching stepEasy
18gap spaces items without touching themGapTeaching stepEasy
19flex-wrap: wrap turns one line into manyWrapping and the align-content trapTeaching stepEasy
20align-content does nothing on a single lineWrapping and the align-content trapTeaching stepMedium
21wrap-reverse, and every cross-axis keyword flipping with itWrapping and the align-content trapTeaching stepMedium
22The last row that will not line upWrapping and the align-content trapTeaching stepHard
23Breaking a flex line where you want itWrapping and the align-content trapTeaching stepHard
24order: 1 sent it to the backOrderTeaching stepMedium
25The flex item that refuses to shrinkThe min-width:auto floorTeaching stepHard
26The truncation that will not truncateThe min-width:auto floorTeaching stepHard
27The scroll pane that will not scrollThe min-width:auto floorTeaching stepHard
28The Flexbox Holy AlbatrossAdvancedTeaching stepHard

44 of 87 catalogue topics are authored, with 37 drills rehearsing them. Every one of them is judged: each carries a starter that has been shown to fail, at least two different correct answers that have been shown to pass, and a set of near-misses and cheats that have been shown to be caught. Nothing reaches this list until all of that holds.