aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-08 22:29:45 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-08 22:29:45 +0000
commit87b97b272c97f69c2ebec6dfb4935810ebfd3218 (patch)
tree48c257fac5a2635a34249b42b519c272bceb8490
parent962b304ef72c6ab2cac78630387706d2b21b0ebd (diff)
Make sure large-width base CSS is after preload.
If it is before, then it is loaded, the onload event doesn't fire, and the base styling is lost if the browser is resized from large to small width.
-rw-r--r--templates/web/fixmystreet.com/header/css.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/web/fixmystreet.com/header/css.html b/templates/web/fixmystreet.com/header/css.html
index 29b0c5b38..f0fe37200 100644
--- a/templates/web/fixmystreet.com/header/css.html
+++ b/templates/web/fixmystreet.com/header/css.html
@@ -10,7 +10,6 @@
</style>
<noscript><link rel="stylesheet" href="[% base_css %]"></noscript>
-<link rel="stylesheet" href="[% base_css %]" media="(min-width:48em)">
<link rel="prefetch" href="[% ol_css %]" as="style">
<link id="preload_base_css" rel="preload" href="[% base_css %]" as="style">
<script nonce="[% csp_nonce %]">
@@ -21,6 +20,7 @@ document.getElementById('preload_base_css').onload = function(){this.rel='styles
b)return a();setTimeout(function(){l(a)})};d.addEventListener&&d.addEventListener("load",k);l(k)};a.loadCSS=b})(this);
(function(a){var b={};b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(b){return!1}};b.poly=function(){for(var b=a.document.getElementsByTagName("link"),e=0;e<b.length;e++){var c=b[e];"preload"===c.rel&&"style"===c.getAttribute("as")&&(a.loadCSS(c.href,c,c.getAttribute("media")),c.rel=null)}};if(!b.support()){b.poly()}})(this);
</script>
+<link rel="stylesheet" href="[% base_css %]" media="(min-width:48em)">
[% ELSE %]
<link rel="stylesheet" href="[% ol_css %]">
<link rel="stylesheet" href="[% base_css %]">