Componentes · Maquetación
Contenedor <Container>
El ancho del contenido: shell (el de casi todo), wide o prose (lectura).
import Container from '@vivla-cms/ds/primitives/Container.astro'Ejemplos
Los tres anchos
shell es el ancho canónico de página (89,5 rem con su margen lateral fluido). wide llega a 94,5 rem. prose es la medida de lectura de Foundations: 585 px de texto (5 de las 12 columnas), para artículos y textos legales. Cada caja es el área de contenido; el margen lateral (gutter) queda fuera.
width="wide" 94,5 rem width="shell" 89,5 rem · por defecto width="prose" 585 px · lectura ---
import Container from '@vivla-cms/ds/primitives/Container.astro'
const widths = [
{ width: 'wide', note: '94,5 rem' },
{ width: 'shell', note: '89,5 rem · por defecto' },
{ width: 'prose', note: '585 px · lectura' },
] as const
---
<div class="flex flex-col gap-3 py-8">
{
widths.map(({ width, note }) => (
<Container width={width}>
<div class="flex items-baseline justify-between gap-4 bg-surface-alt px-4 py-3">
<code class="font-mono text-small">width="{width}"</code>
<span class="text-small text-on-surface-muted">{note}</span>
</div>
</Container>
))
}
</div> Prose con texto real
El ancho de un artículo del blog: 585 px de texto, unos 75 caracteres por línea. Text measure y el cuerpo de los artículos del CMS usan el mismo límite (--container-prose), así que un párrafo suelto y un artículo se leen igual.
Qué incluye cada octavo
Cada casa se divide en ocho partes iguales. Con un octavo tienes unas seis semanas al año, repartidas entre temporada alta, media y baja, y puedes sumar hasta cuatro octavos: hasta media casa. El mantenimiento, la limpieza entre estancias, los seguros y la gestión del calendario van incluidos en una cuota mensual.
---
import Container from '@vivla-cms/ds/primitives/Container.astro'
import Heading from '@vivla-cms/ds/primitives/Heading.astro'
import Text from '@vivla-cms/ds/primitives/Text.astro'
---
<Container width="prose" class="flex flex-col gap-4 py-10">
<Heading level={2} size="statement">Qué incluye cada octavo</Heading>
<Text>
Cada casa se divide en ocho partes iguales. Con un octavo tienes unas seis semanas al año, repartidas entre
temporada alta, media y baja, y puedes sumar hasta cuatro octavos: hasta media casa. El mantenimiento, la
limpieza entre estancias, los seguros y la gestión del calendario van incluidos en una cuota mensual.
</Text>
</Container> Props
| Prop | Valores | Por defecto | Para qué |
|---|---|---|---|
| width | shellwideprose | 'shell' | — |
| as | keyof HTMLElementTagNameMap | — | — |
| data-* | string | undefined | — | Se pasan tal cual al elemento. |
Slots: contenido
Notas del código
El comentario de cabecera de Container.astro, tal cual (en inglés, como el código): si cambia el código, cambia esto.
the page column: full width, gutter-padded, NEVER capped.
The rule (Jorge + Jaime, 05/11/2026): from lg the page margin is 40 px at EVERY screen width — 1280, 1512, 1728, 1920, 2560… — and the 12-column grid stretches between the two margins. It is what Foundations' grid says («Stretch», margin 40, Layout 768:47 / Grid 142:2): the 1512 canvas is where Figma draws it, not a maximum. Until 05/11 shell capped its content at --container-shell (1432) and wide its box at --container-wide (1512), so above 1512 the column centred: on Jaime's 16" Mac (1728) bar, cards, footer and contact band started at 148 while the full-bleed blocks (home split banner, split feature) kept their text at 40 — «no ajustado». The cap and the wide token are gone; --container-shell stays only as a reference size (Dialog lg, the video lightbox), never as a page width.
shell (default) reuses .content-shell from base.css (safe-area aware): a fixed 16 px margin on phones and 40 px from md. wide is the fluid gutter (px-gutter: 16 at 440 → 40 from lg, 992). From lg the two draw the same column, 40 px from each edge of the screen (web review 05/11: until then the gutter only reached 40 at 1512, so wide text sat at 29–38 px between 992 and 1512). They differ only between 768 and 992 (shell: 40 · wide: 30 → 40) and in safe-area handling. Both names stay: callers choose by the margin they want on tablets.
Reading text does NOT stretch with the column: a block keeps its line length with a column span (<Col>), a text measure (Text measure, max-w-[…] boxes drawn by Figma) or prose below.
prose is the READING MEASURE of Foundations: 585 px of text (5 of the 12 columns at the 1512 canvas, 5 × 101 + 4 × 20, «cualquier bloque debería medir uno de estos anchos», Layout 768:97) — --container-prose. It is the one width that stays capped, centred on any screen: the gutters sit OUTSIDE that measure, so the box caps at prose + 2 × gutter and the text column is 585 px wide wherever it fits. It is the width of a blog post body, a legal document and an article-surface gallery; Text measure and cms-blocks' ARTICLE_TEXT_MEASURE use the same token, so the three read identically.
(Until 15/10 this was Tailwind's built-in max-w-prose, 65ch ≈ 736 px with a 656 px text column — ~85 characters, wider than Foundations draws.)
Dónde se usa
33 veces en 24 archivos de la web y los bloques del CMS.
Ver los archivos
- packages/cms-blocks/src/renderers/Media.astro ×4
- apps/web/src/layouts/chrome/Footer.astro ×2
- apps/web/src/pages/dev/kit/media.astro ×2
- apps/web/src/pages/dev/kit/video-parts.astro ×2
- packages/cms-blocks/src/renderers/CardGrid/team.astro ×2
- packages/cms-blocks/src/renderers/LandingHero.astro ×2
- packages/cms-blocks/src/renderers/parts/CardRail.astro ×2
- apps/web/src/layouts/chrome/Nav.astro ×1
- apps/web/src/pages/dev/hero/index.astro ×1
- apps/web/src/pages/dev/kit.astro ×1
- apps/web/src/sections/listing/ListingGallery.astro ×1
- apps/web/src/sections/listing/ListingHero.astro ×1
- apps/web/src/sections/listing/ListingNearby.astro ×1
- packages/cms-blocks/src/renderers/Chapter/photo.astro ×1
- packages/cms-blocks/src/renderers/Chapter/wordmark.astro ×1
- packages/cms-blocks/src/renderers/Hero/cover.astro ×1
- packages/cms-blocks/src/renderers/Hero/home.astro ×1
- packages/cms-blocks/src/renderers/Hero/image.astro ×1
- packages/cms-blocks/src/renderers/Hero/media.astro ×1
- packages/cms-blocks/src/renderers/Hero/studio.astro ×1
- packages/cms-blocks/src/renderers/Hero/textOverMedia.astro ×1
- packages/cms-blocks/src/renderers/HomeShowcase/Slide.astro ×1
- packages/cms-blocks/src/renderers/MediaCollage/catalog.astro ×1
- packages/cms-blocks/src/renderers/MediaCollage/drift.astro ×1