Skip to content

fix: inheritable properties leaking in.#6

Merged
knightedcodemonkey merged 2 commits intomainfrom
bananas
Mar 16, 2026
Merged

fix: inheritable properties leaking in.#6
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 16:59
Copy link
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 aims to prevent inheritable CSS properties from the app shell leaking into the preview when rendering inside a ShadowRoot, while keeping the preview host layout consistent across light DOM vs ShadowRoot modes.

Changes:

  • Introduces ShadowRoot base styles (including :host { all: initial; ... }) and prepends them to injected preview CSS when the render target is a ShadowRoot.
  • Refactors .preview-host layout properties into CSS custom properties so ShadowRoot base styles can re-apply layout after resets.
  • Removes the .shadow-hint::before tooltip caret styling and updates hover/focus selectors accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/styles.css Moves preview-host layout to CSS variables; removes tooltip caret (.shadow-hint::before) styles.
src/app.js Prepends ShadowRoot base stylesheet to injected styles to reset inheritable leakage and restore layout via variables.
docs/next-steps.md Adds roadmap items for in-browser linting, type-checking, and testing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey changed the title fix: inheritable properites leaking in. fix: inheritable properties leaking in. Mar 16, 2026
@knightedcodemonkey knightedcodemonkey merged commit ed9e9ad into main Mar 16, 2026
1 check passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 16, 2026 17:10
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