# HG changeset patch # User drewp@bigasterisk.com # Date 2023-05-29 20:23:16 # Node ID 698da65519a3b9919a0c6483bb285f866950a406 # Parent b51c74da9d3556631d174a4e931e5f68becb91e3 attempt to work around :host style not applying since this el got transplanted diff --git a/light9/web/floating_color_picker.ts b/light9/web/floating_color_picker.ts --- a/light9/web/floating_color_picker.ts +++ b/light9/web/floating_color_picker.ts @@ -230,10 +230,19 @@ class PickerFloat { this.getFloatEl(); this.getRainbow(); } - + private forceHostStyle(el: HTMLElement) { + el.style.zIndex = "10"; + el.style.position = "fixed"; + el.style.left = "0"; + el.style.top = "0"; + el.style.width = "100%"; + el.style.height = "100%"; + el.style.display = "none"; + } private getFloatEl(): Light9ColorPickerFloat { if (!this.floatEl) { this.floatEl = document.createElement("light9-color-picker-float") as Light9ColorPickerFloat; + this.forceHostStyle(this.floatEl); this.subscribeToFloatElement(this.floatEl); document.body.appendChild(this.floatEl); }