theme.json has no styles.elements when no design system is built

Aperta
#5,817 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php, wordpress
Ambito
backend

Direzione di ricerca

Start by reading ThemeJsonProjection::withSystem() and the WordPressSitePlan path that skips it. Trace how the source element styles and unconditional link and heading defaults are projected when no design system exists. Done means those styles appear in generated theme.json, or a diagnostic explains their absence; the issue does not name a test to run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The block-theme scorecard reports link, button and heading as used but unstyled (theme_json fails). The generated theme.json styles has only spacing and typography.lineHeight. Even the unconditional link/heading fontFamily: inherit default in ThemeJsonProjection is missing.

That default is written only inside withSystem(), which is skipped when the site plan has no usage-derived design system (WordPressSitePlan).

Expected

Element defaults, and the element styles observed in the source, are projected even when no design system is built. Otherwise a diagnostic should explain why they're absent.

Seen on

A 36-route import of a site built with a hosted site builder. Its scorecard reports unstyled_used: [link], along with the empty element styles above.

AI assistance: drafted with Claude (Anthropic) via Claude Code from a human-directed import investigation; measurements come from a real import.

Lingua principale
PHP
Stelle
28
Fork
5
Merge medio
2h 59m
PR unite (30g)
942

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/blocks-engine

Tutte le issue di Automattic/blocks-engine

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.