Skip to content

feat(preview): split base/user iframe styles.#127

Merged
knightedcodemonkey merged 3 commits intomainfrom
bananas
May 3, 2026
Merged

feat(preview): split base/user iframe styles.#127
knightedcodemonkey merged 3 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

Copilot AI review requested due to automatic review settings May 3, 2026 01:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @import behavior 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.

Comment thread src/modules/preview-runtime/iframe-preview-executor.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread playwright/rendering-modes/core.spec.ts
Comment thread src/modules/preview-runtime/iframe-preview-executor.js Outdated
Comment thread src/modules/preview-runtime/iframe-preview-executor.js Outdated
@knightedcodemonkey knightedcodemonkey merged commit 49d1ce3 into main May 3, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 3, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants