stylesheet

Save current stylesheet to local storage

只谈情不闲聊 提交于 2020-07-22 09:11:22
问题 I know that this question has been asked, but none of the posts have helped me to get through it. So, here is the thing - I have two stylesheets on my site. I want to save lately used stylesheet to local storage. Switching between stylesheets works perfectly. Here is my code: window.onload = function() { var currentStylesheet = localStorage.getItem("stylesheet"); document.getElementById("stylesheet").value = currentStylesheet; document.getElementById("stylesheet").setAttribute("href",

Flash of unstyled content (FOUC) in Firefox only? Is FF slow renderer?

两盒软妹~` 提交于 2020-07-04 08:35:30
问题 I'm not seeing this issue in any other browser that I've tested - IE, Chrome, Opera - but whenever I load a page from the server, I'm seeing a flash of unstyled content before the CSS is applied. This is even happening on subsequent page loads where everything should be cached - every time the page loads I see the unstyled content for a split-second, then everything settles in. It's also worth noting (perhaps?) that the page is using @font-face to pull some Google fonts. They are stored in a