I have a few linked style sheets on a sample site (https://responsive.webcraft101.com/index.html). One of the links is to be toggled on and off, so it includes an id:
<link id="sketch" rel="stylesheet" type="text/css" href="styles/sketch.css">
I jave some JavaScript on the header element which disables and enables the style sheet. A simplified version is:
var ss = document.querySelector('link#sketch');
var header = document.querySelector('header');
header.onclick = event => { ss.disabled = !ss.disabled; } ;
It works well enough. However, when I look at the style sheets in Firefox’s developer tools, the sketch.css style sheet is added to the list every time disabled is set to false.
Does that indicate something wrong with the process? How can I stop this from happening?
Edit
This is the case both on my Mac with lots of addons, and on my Windows, even with addons disabled.