CSS Playground
Flexbox, grid and CSS features few people remember exist: container queries, :has(), popover, anchor positioning, @property and more. Move the controls or edit the CSS and see it live.
Flexbox
Widely availableLays out items in one direction (row or column) and controls alignment, spacing and wrapping.
💡 gap works in flexbox: no more margin on every item to separate them.
:root {
--direction: row;
--justify: flex-start;
--align: stretch;
--wrap: nowrap;
--gap: 12px;
}Demo HTML
<div class="row"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> </div>
How is it calculated?
Processed in your browser; nothing is sent.
⌨️ Use from the terminal (JSON)
This tool also runs outside the site: the cli.js script uses the same logic as this page and returns the result as JSON. Parameters are the same as this page's URL — copy the command below with the values on screen.
deno run -q "https://thecodecodex.com/cli.js?tool=css-playground"
curl -s https://thecodecodex.com/cli.js | node --input-type=module - css-playground demo=…
| Parameter | Description | Default |
|---|---|---|
| demo | demo: flexbox | grid | container | clamp | sticky | has | sibling-index | popover | accordion | scroll-snap | field-sizing | property | color-mix | backdrop | text-wrap | scroll-driven | flexbox |
| v | valores dos controles, na ordem, separados por vírgula | — |
| css | CSS editado (no site fica depois do #) | — |
| lang | pt | en (comentários e textos da demo) | pt |
Requires Deno, Node.js or Bun. With Deno the script runs with no permissions: it cannot read files or access the network. Central Bank indicators are from the day the site was published.