Love the code. Devilishly simple Thank you!
When the code sets the <style> section, the white space is removed. This messes up the css and causes a bug. Took a few minutes to figure out what was going on.
style.innerHTML=css.textContent.replace(/\s/g,"");