Repository navigation
Conversation
…ground beats Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; the three previous background issues are addressed. SummaryDrawn frames now get their default white background from a low-priority CSS rule rather than an inline style.
Reviews (2) · Last reviewed commit: "fix(canvas): recognise the old frame whi..." · Reviewed by Greptile |
…t as a layered rule Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
ArcticSlayy
added a commit
to ArcticSlayy/doop
that referenced
this pull request
Nov 15, 2026
fix(canvas): make a drawn frame's white a default a design's own background beats (upstream doop-design#492)
kgoedecke
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 3653221318ba04ef7e3064a4f72536d580fbca47)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Frame tool made an empty frame white by writing
background: #ffffffinline on the document's<body>(drawingDocument). An inline style beats any stylesheet, so when a design was later put into a drawn frame, its ownbody { background: … }lost and the design sat on white.For a dark design that is the remaining source of the light line along a frame's edge on a dark canvas (the one #440 could not reach): the frame's last pixel is blended by the compositor, and the white body under the dark design is what gets blended in. Measured in Chrome on such a frame, the edge pixel read 44–71 against a design of 16 and a canvas of 20.
This PR removes the white instead of correcting the blend.
Change
shared/framePaper.ts: the paper is now<style data-doop-paper>@layer doop-paper{:where(body){background:#ffffff}}</style>, first in the document's head.:where()has no specificity and the layer is declared before any a design brings, so a design's body background wins whether it is layered (Tailwind) or not.drawingDocumentwrites that rule for the Frame tool instead of the inline style.drawingMoveremoves it where it used to clear the inline background (a shell made for a lifted element).withPaperRuleheals frames saved before: it turns the old inline white into the rule. It recognises only the exact pair the old Frame tool wrote (the shell style onhtml, and that shell plus the white as the body's whole style attribute), so an inline white a design chose is never touched, and it judges nothing about the design's CSS, so a rule that does not apply cannot take the white away. It runs whereverwithFontFacesdoes (actionson every write,FrameView's save path), so an affected frame is fixed on its next save.Verified
tests/framePaper.test.ts: the conversion, that it settles, and what it must not touch.tests/framePaperBrowser.test.ts(Chromium): an unstyled body stays white, an inactivebody.darkrule leaves it white, and unlayered, layered and zero-specificity design rules all beat the paper; a healed drawn frame shows the design's background and an empty one stays white.tests/drawing.test.ts: the Frame tool writes the rule and no inline background.drawingMove,fontFrameWrites,designTokenWritesanddrawingBrowser; typecheck, lint, format check and doc-lint are clean. The full suite has not been run locally.withPaperRuleread-only against a real canvas in the dev app: its three drawn frames (two holding a dark design, one empty) were converted, body tag and head only, and converting again changed nothing; an agent-made frame was untouched.Notes
🤖 Generated with Claude Code