Table of Contents

CSS Containment

— how elements hold, limit,
and shape the space
their children live in

Containment is the idea that
every element creates a space of responsibility.
A parent defines the boundaries within which
its children flow, align, and express themselves.

Containment is the quiet architecture beneath every layout.

Containment tells us:

Containment may seem to be about control
but it is actually about context.
When we understand it,
we can describe layout intentions with precision.

Examples of what to say:

“Keep this element inside its container.”
“Let the container grow with its content.”
“Do not let this child escape the parent’s boundaries.”
“Respect the container’s padding.”

Containment is the mental model that
makes structure predictable
.

Why Containment matters when working with AI

AI needs to know where the work happens.

When we name the container,
we are defining the scope:

Containment is how we prevent
unintended rewrites and keep changes safe
.



Tony de Araujo —New York | Lisbon