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

Đang mở
#5,817 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, wordpress
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
PHP
Star
28
Fork
5
Merge trung bình
2 giờ 59 phút
Pull request đã merge (30 ngày)
942

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Automattic/blocks-engine

Tất cả issue của Automattic/blocks-engine

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.