public enum ContainmentWhat a node promises about its contents, so that the rest of the tree may ignore them.
Remarks
CSS Containment 2's contain, which is five independent effects behind one property rather than one switch with five settings — and reading it as one switch is how it gets built wrong. The eight Tailwind classes are combinations: contain-content is layout paint style and contain-strict adds size, so a partial implementation makes both aggregates half true rather than absent.
⚠ Size is not "skip the children", and that is the whole trap. § 3.2 says the box is sized as if it had no contents. It still lays them out, paints them, hit-tests them and scrolls them — it only refuses to let them decide its own box. A reading that skipped the subtree would give the same picture in every fixture where the children happen to fit, which is most of them.
⚠ There is no style member, and its absence is a measurement rather than an omission. § 3.4 scopes counters and quotes to the subtree; this engine has neither, so every value of it would compute and move nothing. LayoutStyleBuilder therefore accepts the keyword and maps it to no flag, which is the difference between a property that does nothing here and one that is not understood.
Fields and properties (5)
NoneThe initial value: the contents decide everything they normally would.
Size§ 3.2. The box sizes as if it were empty, on both axes.
InlineSize§ 3.2's one-axis form. The box sizes as if it were empty across the inline axis only, and its block size still comes from its contents laid out at that width.
Layout§ 3.1. An independent formatting context, and a containing block for every out-of-flow descendant.
Paint§ 3.3. Descendants are clipped to the box, and it is a containing block and an independent formatting context for the same reasons Layout is.
Used by (5)
- ContainmentReaderVixen.Ui
- ContainmentTestsVixen.Ui.Layout.Tests
- LayoutStyleVixen.Ui.Layout
- LayoutTreeVixen.Ui.Layout
- OverflowReaderVixen.Ui