mirror of
https://github.com/PR0M3TH3AN/bitlogin.git
synced 2026-10-27 08:31:21 +00:00
The widget renders in a shadow root, so hosts could recolor it via the :host custom properties but couldn't restyle structure (padding, borders, box-shadow, button shape) -- which is why an embed can look pasted in. Stamp a stable set of shadow parts once per render in exposeParts(): card; button (+button-primary/button-secondary); link; input; checkbox; heading; text; notice (+notice-warn/-info/-error). Mapped by existing class in one place rather than inline on ~60 rendered elements, so new buttons/notices stay exposed automatically instead of drifting. Documented as a contract in the README "Theming" section, alongside the existing custom-property theming (still the first tool for color/radius/ font; parts are the escape hatch for structure). Verified in-browser that bitlogin-auth::part(...) matches from light-DOM CSS through the shadow boundary. Addresses the "CSS parts" item of the Tessera integration feedback (docs/TODO.md). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01BXQCvJPA6sVSQ5j8uBd9bB