Skip to content

docs(embedding): fix the troubleshooting row that denies the shadow root #261

Closed

Description

@sydevs-bot

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 upgrades
  • docs/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 root
  • docs/embedding.md:1040-1041 — the root is reachable as
    document.querySelector('sahaj-atlas').shadowRoot, "deliberately open, not closed"

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.md states 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.md is left alone — nothing a host can observe changed, only the guide's accuracy.

Verification checklist

  • grep -n "shadow" docs/embedding.md shows no line denying a shadow root.
  • grep -n "no shadow DOM" docs/embedding.md returns nothing.
  • pnpm lint && pnpm typecheck && pnpm test:run pass.

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

Activity

  1. added theissue type on Oct 8, 2026
  2. added
    proposal
    on Oct 8, 2026
  3. Ardnived commented on Oct 9, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  4. removed
    proposal
    on Oct 9, 2026
  5. moved this from Proposed to Approved in SYDevelopers Technical Roadmapon Oct 9, 2026
  6. added
    bot:working
    on Oct 9, 2026
  7. sydevs-bot commented on Oct 9, 2026

    @sydevs-bot
    ContributorAuthor

    🤖 no session running

    recent dispatches
    • 16:38Z implement · attempt 1 · session · done
    • 16:38Z implement · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  8. removed
    bot:working
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions