# drawer — alcance de tema: análisis y propuesta > Generado por `node --import tsx/esm scripts/theming-census.ts --report`. > Lo **medido** y la **propuesta** se regeneran; el **Veredicto** (§5) se conserva. > Vista de conjunto: [README](./README.md) · método y protocolo: > [`PLAN-theming.md`](../../process/PLAN-theming.md) §1, §2, §7. - **Medido**: 2026-08-22 · **Alcance**: **57%** — 34 de 60 knobs por token público - **Knobs de apariencia**: 62 — público 34 · privado 8 · global 13 · literal 5 · sistema 2 _(fuera del ratio)_ - **Contrato hoy** (`lib/recipes/base.ts`): 44 pública(s) — `overlay-bg`, `overlay-blur`, `overlay-opacity`, `overlay-z`, `content-z`, `inline-z`, `handle-bg`, `active-handle-bg`, `handle-radius`, `handle-length`, `handle-thickness`, `handle-active-scale`, `handle-transition-duration`, `handle-transition-ease`, `content-fg`, `content-radius`, `content-shadow-dragging`, `content-ring-dragging-width`, `content-ring-dragging-fg`, `content-ring-dragging-offset`, `content-inset`, `content-width-sm`, `content-width-md`, `content-width-lg`, `content-height-sm`, `content-height-md`, `content-height-lg`, `content-padding-sm`, `content-padding-md`, `content-padding-lg`, `content-padding-full`, `stack-gap`, `header-gap`, `footer-gap`, `footer-margin-top`, `title-font-family`, `title-font-size`, `title-font-weight`, `title-line-height`, `title-fg`, `description-font-family`, `description-font-size`, `description-line-height`, `description-fg` - **Eje `size`**: sí · **ficheros**: `drawer.css` ## 1. Knobs fuera de alcance ### 1.1 Directo a primitivo global (13) | # | fichero:línea | selector | propiedad | valor | | ---: | --- | --- | --- | --- | | 1 | `drawer.css:7` | `[data-drawer-trigger]` | `gap` | `var(--space-2)` | | 2 | `drawer.css:8` | `[data-drawer-trigger]` | `min-block-size` | `var(--control-height-md)` | | 3 | `drawer.css:9` | `[data-drawer-trigger]` | `padding-inline` | `var(--space-3)` | | 4 | `drawer.css:10` | `[data-drawer-trigger]` | `border` | `var(--border-width) solid var(--color-border-default)` | | 5 | `drawer.css:11` | `[data-drawer-trigger]` | `border-radius` | `var(--radius-md)` | | 6 | `drawer.css:12` | `[data-drawer-trigger]` | `background` | `var(--color-surface-raised)` | | 7 | `drawer.css:13` | `[data-drawer-trigger]` | `color` | `var(--color-content-primary)` | | 8 | `drawer.css:15` | `[data-drawer-trigger]` | `font-weight` | `var(--font-weight-medium)` | | 9 | `drawer.css:20` | `[data-drawer-trigger]:hover` | `background` | `var(--color-surface-overlay)` | | 10 | `drawer.css:110` | `[data-drawer-content][data-side='right']` | `border-left` | `var(--border-width-thick) solid transparent` | | 11 | `drawer.css:113` | `[data-drawer-content][data-side='left']` | `border-right` | `var(--border-width-thick) solid transparent` | | 12 | `drawer.css:116` | `[data-drawer-content][data-side='top']` | `border-bottom` | `var(--border-width-thick) solid transparent` | | 13 | `drawer.css:119` | `[data-drawer-content][data-side='bottom']` | `border-top` | `var(--border-width-thick) solid transparent` | ### 1.2 A través de un privado (8) | # | fichero:línea | selector | propiedad | valor | | ---: | --- | --- | --- | --- | | 1 | `drawer.css:82` | `[data-drawer-content]` | `min-inline-size` | `var(--_drawer-content-min-width-override, auto)` | | 2 | `drawer.css:84` | `[data-drawer-content]` | `min-block-size` | `var(--_drawer-content-min-height-override, auto)` | | 3 | `drawer.css:189` | `[data-drawer-content][data-variant='overlay'][data-size='full']` | `width` | `var(--_drawer-content-width-override, auto)` | | 4 | `drawer.css:190` | `[data-drawer-content][data-variant='overlay'][data-size='full']` | `height` | `var(--_drawer-content-height-override, auto)` | | 5 | `drawer.css:240` | `[data-drawer-content][data-variant='inline'][data-size='full']` | `width` | `var(--_drawer-content-width-override, auto)` | | 6 | `drawer.css:241` | `[data-drawer-content][data-variant='inline'][data-size='full']` | `height` | `var(--_drawer-content-height-override, auto)` | | 7 | `drawer.css:256` | `[data-drawer-content][data-variant='persistent'][data-side='left'], [data-drawer-content][data-variant='persistent'][data-side='right']` | `width` | `var(--_drawer-panel-width)` | | 8 | `drawer.css:263` | `[data-drawer-content][data-variant='persistent'][data-side='top'], [data-drawer-content][data-variant='persistent'][data-side='bottom']` | `height` | `var(--_drawer-panel-height)` | ### 1.3 Literales (5) | # | fichero:línea | selector | propiedad | valor | | ---: | --- | --- | --- | --- | | 1 | `drawer.css:56` | `[data-drawer-overlay][data-variant='overlay']` | `opacity` | `1` | | 2 | `drawer.css:257` | `[data-drawer-content][data-variant='persistent'][data-side='left'], [data-drawer-content][data-variant='persistent'][data-side='right']` | `block-size` | `100%` | | 3 | `drawer.css:262` | `[data-drawer-content][data-variant='persistent'][data-side='top'], [data-drawer-content][data-variant='persistent'][data-side='bottom']` | `inline-size` | `100%` | | 4 | `drawer.css:267` | `[data-drawer-content][data-variant='persistent'][data-size='full']` | `width` | `100%` | | 5 | `drawer.css:268` | `[data-drawer-content][data-variant='persistent'][data-size='full']` | `height` | `100%` | ## 2. Sistema transversal (2) — informativo, fuera del ratio Un tema los alcanza **a nivel de sistema**, por diseño (recipe-contract §2). | # | fichero:línea | selector | propiedad | valor | | ---: | --- | --- | --- | --- | | 1 | `drawer.css:24` | `[data-drawer-trigger]:focus-visible` | `outline` | `var(--focus-ring-width) solid var(--focus-ring-color)` | | 2 | `drawer.css:31` | `[data-drawer-trigger]:disabled, [data-drawer-trigger][data-disabled]` | `opacity` | `var(--opacity-disabled)` | ## 3. Privados de la receta — ¿de dónde sale su valor? | privado | declaraciones | valor(es) | origen | ¿deriva de un público? | | --- | ---: | --- | --- | :-: | | `--_drawer-size-width` | 4 | `var(--drawer-content-width-md)`, `var(--drawer-content-width-sm)`, `var(--drawer-content-width-lg)` | public | **sí** | | `--_drawer-size-height` | 4 | `var(--drawer-content-height-md)`, `var(--drawer-content-height-sm)`, `var(--drawer-content-height-lg)` | public | **sí** | | `--_drawer-panel-width` | 1 | `var(--_drawer-content-width-override, var(--_drawer-size-width))` | private | no | | `--_drawer-panel-height` | 1 | `var(--_drawer-content-height-override, var(--_drawer-size-height))` | private | no | | `--_drawer-padding` | 5 | `var(--drawer-content-padding-md)`, `var(--drawer-content-padding-sm)`, `var(--drawer-content-padding-lg)`, `var(--drawer-content-padding-full)` | public | **sí** | Consumidos y **no declarados en el CSS** (vienen de `base.ts` o de un estilo inline del wrapper): `--_drawer-content-height-override`, `--_drawer-content-max-height-override`, `--_drawer-content-max-width-override`, `--_drawer-content-min-height-override`, `--_drawer-content-min-width-override`, `--_drawer-content-width-override`. ## 4. Propuesta de corrección - **Tiene eje `size`**: los tokens dimensionales van por talla (`{part}-{eje}-{k}`) apuntando al bundle `--size-{k}-*`, nunca al primitivo crudo (theming §5; el guard `recipe-css-contract` prohíbe el primitivo). ### 4.1 Tokens a declarar en `lib/recipes/base.ts` (8) Valor **verbatim** del CSS de hoy: el default no se mueve, sólo cambia quién puede moverlo. Nombres derivados de recipe-contract §1 (ejes lógicos, talla al final) y theming §6.7 (slots de color, modificador delante). Un token con DOS valores distintos es una colisión de nombre: son dos knobs, o el nombre no distingue lo que debería — se marca `⚠`. | token (`--drawer-…`) | scope TSC | valor propuesto | usos | | --- | --- | --- | ---: | | `trigger-gap` | `root` | `var(--space-2)` | 1 | | `trigger-height` | `root` | `var(--control-height-md)` | 1 | | `trigger-padding-inline` | `root` | `var(--space-3)` | 1 | | `trigger-radius` | `root` | `var(--radius-md)` | 1 | | `trigger-bg` | `root` | `var(--color-surface-raised)` | 1 | | `trigger-fg` | `root` | `var(--color-content-primary)` | 1 | | `trigger-font-weight` | `root` | `var(--font-weight-medium)` | 1 | | `hover-trigger-bg` | `root` | `var(--color-surface-overlay)` | 1 | ### 4.2 Sin nombre mecánico (18) - **⚠ decisión: `border` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border`. - **⚠ decisión: `1` es un valor identidad o geometría de layout, no un knob de tema — el perímetro de «knob» es D-TH.2, sin firmar** — 1: `opacity`. - **⚠ decisión: el privado que alimenta este knob no se declara en el CSS (viene de `base.ts` o de un estilo inline) — hay que resolverlo antes de nombrarlo** — 2: `min-inline-size`, `min-block-size`. - **⚠ decisión: `border-left` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border-left`. - **⚠ decisión: `border-right` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border-right`. - **⚠ decisión: `border-bottom` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border-bottom`. - **⚠ decisión: `border-top` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border-top`. - **⚠ decisión: `width` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 4: `width`. - **⚠ decisión: `height` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 4: `height`. - **⚠ decisión: `100%` es un valor identidad o geometría de layout, no un knob de tema — el perímetro de «knob» es D-TH.2, sin firmar** — 2: `block-size`, `inline-size`. ### 4.4 Lo que hay que comprobar a mano (PLAN-theming §1.3 · §7.4) - [ ] **Privado que no deriva de un público** — §3 lo marca; el privado debe leer el público o desaparecer. - [ ] **Velo o acento en el nodo equivocado** (`archetype: 'item'` en un envoltorio, un `background` en shorthand que mata la capa de estado) — se mide desde el píxel hacia arriba. - [ ] **Doble animación** al mover un sello a una superficie con animación propia — registro de `animationstart`/`animationend`. - [ ] **Diff de computed = 0** en reposo · hover · abierto · disabled · foco, por talla, antes y después. - [ ] **Centinela por token nuevo**: valor imposible en el root → el nodo lo sigue. Si no, el token miente. ## 5. Veredicto _(pendiente — lo escribe el autor; se conserva al regenerar)_