feat(preview): split base/user iframe styles.#127
Conversation
knightedcodemonkey
commented
May 3, 2026
- Address phase 1(B) of Preview typography parity: separate user/base styles and add workspace font configuration (A+B) #125
There was a problem hiding this comment.
Pull request overview
This PR implements phase 1(B) of issue #125 by changing the preview iframe runtime to separate framework/base CSS from user-authored CSS, so top-level user at-rules like @import can be evaluated under a cleaner stylesheet boundary. It also updates Playwright coverage to reflect the new preview style node structure and validate the intended iframe behavior.
Changes:
- Split preview iframe styling into dedicated base and user
<style>nodes, with base ordered before user CSS. - Added Playwright coverage for top-level
@importbehavior and for avoiding duplicate preview style nodes across rerenders. - Updated existing preview/layout tests to inspect the new style element IDs and ordering.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/modules/preview-runtime/iframe-preview-executor.js |
Reworks iframe visual config application to manage separate base/user style elements. |
playwright/rendering-modes/core.spec.ts |
Adds helper updates and new rendering-mode regressions for imported CSS and style-node stability. |
playwright/layout-panels.spec.ts |
Adapts background/style persistence assertions to the split-style-node runtime model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.