Is it possible to make an external stylesheet override all conflicting styles? The use case for this is appending a link to a stylesheet that changes the colors of a page to different colors. I have tried appending the stylesheet to the tag using javascript but I found that other stylesheets colors interfered with mine.
var link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
link.href = `https://randomwebsite.com/main.css`
document.head.appendChild(link);
Edit: I found out why this was happening. The issue was that the tag was appending the beginning of the head when I wanted to append it to the end. Thank you to all that helped me.