From fc4e7b123fe041db11f7352d6e744901ed0b23bd Mon Sep 17 00:00:00 2001 From: Miao Yang Date: Mon, 22 Jun 2026 02:40:41 +0800 Subject: [PATCH 1/4] fix(core): escape digit-leading id selectors in standalone sub-composition preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A CSS identifier cannot start with a digit, so an authored rule like `#01-wall-pushes-back { ... }` is an invalid selector and the browser drops the whole rule — taking the root's size/background with it. A full composition masks this (the host stretches/paints the frame), but a standalone preview has no host, so the root collapses to height:0 + transparent and renders blank. extractFullDocumentParts now rewrites `#` selectors to their escaped valid form (`#\30 1-...`, still matching the element id), scoped to ids actually present and matched only as `#id` not followed by an ident char so hex colors are never touched. Also harden the