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); }