I am using web components. I have the following html structure
<div class="test">
#shadow-root (open)
<overlay-trigger type="modal">
<div id = "login-dialog">
#shadow-root (open)
<div id = "modal">
I have the following code
const styleString = String(styles);
const style = document.createElement("style");
style.type = "text/css";
style.innerHTML = styleString;
const styleString2 = String(guestModalStyles);
const style2 = document.createElement("style");
style2.type = "text/css";
style2.innerHTML = styleString2;
let host = this.renderRoot?.querySelector('overlay-trigger[type="modal"]')?.querySelector("#login-dialog")?.shadowRoot?.querySelector(".modal");
if (host) {
host?.appendChild(style);
host?.appendChild(style2);
}
How can I add styles to the modal element? The one with class = "modal"? I'm I doing it right above?