Skip to content

fix: Inherited CSS color invisible in rendered output (Page.captureScreenshot path)#1408

Open
manupareekk wants to merge 2 commits into
heygen-com:mainfrom
manupareekk:fix/issue-1290
Open

fix: Inherited CSS color invisible in rendered output (Page.captureScreenshot path)#1408
manupareekk wants to merge 2 commits into
heygen-com:mainfrom
manupareekk:fix/issue-1290

Conversation

@manupareekk

Copy link
Copy Markdown
Contributor

Fixes #1290

Draft PR with unit tests.

manupareekk and others added 2 commits June 13, 2026 05:12
…enshot

Fixes heygen-com#1290

- Use HTMLElement typing in page.evaluate helper
- Keep materializeInheritedTextColors module-private (fallow)

Co-authored-by: Cursor <cursoragent@cursor.com>
@manupareekk manupareekk marked this pull request as ready for review June 13, 2026 06:06
@miguel-heygen

Copy link
Copy Markdown
Collaborator

@manupareekk do you have a minimal repro video example i can use to verify the fix works?

@manupareekk

Copy link
Copy Markdown
Contributor Author

Yep, added a minimal repro + verification video.

The repro is intentionally small: the parent has color: white, while the child text has no explicit color and relies on inheritance. I verified it against commit 6192652 by calling the engine’s real pageScreenshotCapture path, which runs Page.captureScreenshot.

Attached:

  • inherited-css-color-repro.html
  • pr-actual-pageScreenshotCapture-proof-animated.mp4
  • pr-actual-pageScreenshotCapture.png
  • pr-proof-log.json

Verification result:

  • Before capture, the child text had no inline color: ""
  • After pageScreenshotCapture, the child text had materialized inline color: rgb(255, 255, 255)
  • The captured PNG contains visible white text on the dark target
  • Focused test run: packages/engine/src/services/screenshotService.test.ts passed 16/16
pr-actual-pageScreenshotCapture-proof-animated.mp4

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.

Inherited CSS color invisible in rendered output (Page.captureScreenshot path)

2 participants