8.2 KiB
heading — 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 · método y protocolo:PLAN-theming.md§1, §2, §7.
- Medido: 2026-08-19 · Alcance: 0% — 0 de 36 knobs por token público
- Knobs de apariencia: 36 — público 0 · privado 36 · global 0 · literal 0 · sistema 0 (fuera del ratio)
- Contrato hoy (
lib/recipes/base.ts): 0 pública(s) · 1 privada(s) forward —_palette-text - Eje
size: no · ficheros:heading.css
1. Knobs fuera de alcance
1.1 Directo a primitivo global (0)
Ninguno.
1.2 A través de un privado (36)
| # | fichero:línea | selector | propiedad | valor |
|---|---|---|---|---|
| 1 | heading.css:19 |
[data-heading] |
font-family |
var(--_heading-font-family, var(--style-h2-font-family)) |
| 2 | heading.css:20 |
[data-heading] |
font-size |
var(--_heading-font-size, var(--style-h2-font-size)) |
| 3 | heading.css:21 |
[data-heading] |
font-weight |
var(--_heading-font-weight, var(--style-h2-font-weight)) |
| 4 | heading.css:22 |
[data-heading] |
line-height |
var(--_heading-line-height, var(--style-h2-line-height)) |
| 5 | heading.css:23 |
[data-heading] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h2-letter-spacing)) |
| 6 | heading.css:24 |
[data-heading] |
color |
var(--_heading-color, var(--style-h2-color)) |
| 7 | heading.css:47 |
[data-heading][data-style='h1'] |
font-family |
var(--_heading-font-family, var(--style-h1-font-family)) |
| 8 | heading.css:48 |
[data-heading][data-style='h1'] |
font-size |
var(--_heading-font-size, var(--style-h1-font-size)) |
| 9 | heading.css:49 |
[data-heading][data-style='h1'] |
font-weight |
var(--_heading-font-weight, var(--style-h1-font-weight)) |
| 10 | heading.css:50 |
[data-heading][data-style='h1'] |
line-height |
var(--_heading-line-height, var(--style-h1-line-height)) |
| 11 | heading.css:51 |
[data-heading][data-style='h1'] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h1-letter-spacing)) |
| 12 | heading.css:52 |
[data-heading][data-style='h1'] |
color |
var(--_heading-color, var(--style-h1-color)) |
| 13 | heading.css:56 |
[data-heading][data-style='h3'] |
font-family |
var(--_heading-font-family, var(--style-h3-font-family)) |
| 14 | heading.css:57 |
[data-heading][data-style='h3'] |
font-size |
var(--_heading-font-size, var(--style-h3-font-size)) |
| 15 | heading.css:58 |
[data-heading][data-style='h3'] |
font-weight |
var(--_heading-font-weight, var(--style-h3-font-weight)) |
| 16 | heading.css:59 |
[data-heading][data-style='h3'] |
line-height |
var(--_heading-line-height, var(--style-h3-line-height)) |
| 17 | heading.css:60 |
[data-heading][data-style='h3'] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h3-letter-spacing)) |
| 18 | heading.css:61 |
[data-heading][data-style='h3'] |
color |
var(--_heading-color, var(--style-h3-color)) |
| 19 | heading.css:65 |
[data-heading][data-style='h4'] |
font-family |
var(--_heading-font-family, var(--style-h4-font-family)) |
| 20 | heading.css:66 |
[data-heading][data-style='h4'] |
font-size |
var(--_heading-font-size, var(--style-h4-font-size)) |
| 21 | heading.css:67 |
[data-heading][data-style='h4'] |
font-weight |
var(--_heading-font-weight, var(--style-h4-font-weight)) |
| 22 | heading.css:68 |
[data-heading][data-style='h4'] |
line-height |
var(--_heading-line-height, var(--style-h4-line-height)) |
| 23 | heading.css:69 |
[data-heading][data-style='h4'] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h4-letter-spacing)) |
| 24 | heading.css:70 |
[data-heading][data-style='h4'] |
color |
var(--_heading-color, var(--style-h4-color)) |
| 25 | heading.css:74 |
[data-heading][data-style='h5'] |
font-family |
var(--_heading-font-family, var(--style-h5-font-family)) |
| 26 | heading.css:75 |
[data-heading][data-style='h5'] |
font-size |
var(--_heading-font-size, var(--style-h5-font-size)) |
| 27 | heading.css:76 |
[data-heading][data-style='h5'] |
font-weight |
var(--_heading-font-weight, var(--style-h5-font-weight)) |
| 28 | heading.css:77 |
[data-heading][data-style='h5'] |
line-height |
var(--_heading-line-height, var(--style-h5-line-height)) |
| 29 | heading.css:78 |
[data-heading][data-style='h5'] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h5-letter-spacing)) |
| 30 | heading.css:79 |
[data-heading][data-style='h5'] |
color |
var(--_heading-color, var(--style-h5-color)) |
| 31 | heading.css:83 |
[data-heading][data-style='h6'] |
font-family |
var(--_heading-font-family, var(--style-h6-font-family)) |
| 32 | heading.css:84 |
[data-heading][data-style='h6'] |
font-size |
var(--_heading-font-size, var(--style-h6-font-size)) |
| 33 | heading.css:85 |
[data-heading][data-style='h6'] |
font-weight |
var(--_heading-font-weight, var(--style-h6-font-weight)) |
| 34 | heading.css:86 |
[data-heading][data-style='h6'] |
line-height |
var(--_heading-line-height, var(--style-h6-line-height)) |
| 35 | heading.css:87 |
[data-heading][data-style='h6'] |
letter-spacing |
var(--_heading-letter-spacing, var(--style-h6-letter-spacing)) |
| 36 | heading.css:88 |
[data-heading][data-style='h6'] |
color |
var(--_heading-color, var(--style-h6-color)) |
1.3 Literales (0)
Ninguno.
2. Sistema transversal (0) — informativo, fuera del ratio
Un tema los alcanza a nivel de sistema, por diseño (recipe-contract §2).
Ninguno.
3. Privados de la receta — ¿de dónde sale su valor?
| privado | declaraciones | valor(es) | origen | ¿deriva de un público? |
|---|---|---|---|---|
--_heading-color |
1 | var(--_heading-palette-text) |
private | no |
Consumidos y no declarados en el CSS (vienen de base.ts o de un estilo inline del wrapper): --_heading-align, --_heading-clamp, --_heading-font-family, --_heading-font-feature, --_heading-font-size, --_heading-font-weight, --_heading-letter-spacing, --_heading-line-height, --_heading-measure, --_heading-palette-text, --_heading-wrap.
4. Propuesta de corrección
4.1 Tokens a declarar en lib/recipes/base.ts (1)
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 (--heading-…) |
scope TSC | valor propuesto | usos |
|---|---|---|---|
fg |
root |
var(--_heading-palette-text) |
6 |
4.2 Sin nombre mecánico (30)
- ⚠ decisión: el privado que alimenta este knob no se declara en el CSS (viene de
base.tso de un estilo inline) — hay que resolverlo antes de nombrarlo — 30:font-family,font-size,font-weight,line-height,letter-spacing.
4.3 Avisos sobre los tokens propuestos (1)
- el privado
--_heading-colordebe pasar a leer este público (o desaparecer) —--heading-fg
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, unbackgrounden 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)