/* <container-name> */
container: my-layout;
/* <container-name> / <container-type> */
container: my-layout / size;
/* Global Values */
container: inherit;
container: initial;
container: revert;
container: revert-layer;
container: unset;`container` CSS property / notebook
`container` CSS property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div class="post">
<div class="card">
<h2>Card title</h2>
<p>Card content</p>
</div>
</div>.post {
container-type: inline-size;
container-name: sidebar;
}.post {
container: sidebar / inline-size;
}@container sidebar (width >= 400px) {
/* <stylesheet> */
}