mirror of
https://github.com/PR0M3TH3AN/bitlogin.git
synced 2026-10-29 09:31:21 +00:00
element.ts re-injected the widget's CSS as a fresh inline <style> tag on every render() call. A host with a strict style-src (e.g. `style-src 'self'`, no 'unsafe-inline') silently drops an inline <style>'s rules entirely -- every element inside the shadow root fell back to unstyled browser defaults. The visible symptom: the brand SVG rendered at its raw intrinsic ~590x119px instead of the intended 20px-tall lockup, since its `display: block; height: 20px` rule never took effect. Build the stylesheet once as a CSSStyleSheet and assign it via adoptedStyleSheets instead -- not subject to style-src the way a parsed inline <style> element is, since it's never parsed as untrusted markup by the HTML parser. render() no longer touches styling at all. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DY9UMTuF43Ekc2U4E1eDwX