
I have tried this which fails without a console error; imported CSS won’t effect the JavaScript HTML file.
const cssElement = document.createElement("link");
cssElement.setAttribute("rel", "stylesheet");
cssElement.setAttribute("type", "text/css");
cssElement.setAttribute("href", "https://raw.githubusercontent.com/USER/REPOSITORY/main/DIRECTORY/FILE.css");
document.head.appendChild(cssElement);