I am using an script which uses a remote file.css. I want to add a local file.css in order to override some remote.css styles.
Any suggestion of how could I do it?
Thank you!
If you just want to use the new styles instead, you can find the link element and just replace the href with the path to the other file. Like this:
document.querySelector("link[href=style.css]").href = "path/to/new/file.css";
If you want to override some styles, you'll need to make sure the new file is loaded after the first and then either use more specific selecors or !important. You can't really "edit" the file in the browser before loading it though, which is what it sounds like you might be asking about.
If you want to edit the css and not to replace all the css, you can use inline style or you can use bootstrap. For example:
…