Repository navigation
Description
Summary
docs/embedding.md contradicts itself about the one boundary a host most needs to understand. The
Troubleshooting table tells an integrator the widget has no shadow DOM; five other passages in
the same file tell them it renders inside an open shadow root, and that this is precisely what stops
their CSS reaching in. A host reading the troubleshooting row is sent to look for a cause that
cannot exist.
Found incidentally while reviewing the roadmap goal #255.
Approach
docs/embedding.md:1181, the row "The widget looks wrong on your site only", currently reads:
Your global CSS is reaching into it. The widget scopes its own styles out of your page, but has
no shadow DOM to keep yours out.
Both sentences after the first are wrong as of #236. The rest of the file states the opposite:
docs/embedding.md:983— "The reverse direction is a boundary, not a defence. The widget renders
inside a shadow root"docs/embedding.md:990— the element attaches its shadow root in its constructor, so light-DOM
children are hidden from the moment the element upgradesdocs/embedding.md:1024— "into its shadow root, which is what makes your CSS unable to reach in"docs/embedding.md:946— the widget's stylesheet is adopted by its shadow rootdocs/embedding.md:1040-1041— the root is reachable as
document.querySelector('sahaj-atlas').shadowRoot, "deliberatelyopen, notclosed"
Rewrite the row so its diagnosis matches the boundary that exists. The honest cause of "looks wrong
on your site only" is no longer inherited global CSS: with an open shadow root the remaining paths
are inherited properties that cross a shadow boundary (font, color, line-height,
visibility), CSS custom properties the host defines, and ::part/:host styling if a host
reaches for it. docs/embedding.md:1036 already records the one document-global rule that has to
live outside the root, which is the other real path.
Keep the ⚠ markers and the #NNN breadcrumbs in the section (docs/rules/code-comments.md).
Acceptance criteria
- No passage in
docs/embedding.mdstates or implies the widget has no shadow DOM. - The "looks wrong on your site only" row names a cause that is actually reachable through an
open shadow root, and does not tell the reader their global CSS is reaching in. - The row stays consistent with
docs/embedding.md:1036's account of the one document-global
rule that sits outside the root. -
CHANGELOG.mdis left alone — nothing a host can observe changed, only the guide's accuracy.
Verification checklist
-
grep -n "shadow" docs/embedding.mdshows no line denying a shadow root. -
grep -n "no shadow DOM" docs/embedding.mdreturns nothing. -
pnpm lint && pnpm typecheck && pnpm test:runpass.
Notes
The row predates #236, which is when the widget moved inside a shadow root. #157
("evaluate shadow DOM now that the CSS reset has a measured gap") is the evaluation that led there,
and is closed — it is not a duplicate of this.
docs/embedding.md and CHANGELOG.md are the only documentation an embedding site ever reads, and
#93 is the precedent for how long a wrong statement there can survive: the
README told hosts to load a filename the build had never emitted, for months.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Oct 9, 2026
@sydevs-bot implement
sydevs-bot commentedon Oct 9, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.