Include base stylesheet via link instead of style
authorMagnus Hagander <magnus@hagander.net>
Thu, 20 Dec 2018 15:27:55 +0000 (16:27 +0100)
committerMagnus Hagander <magnus@hagander.net>
Fri, 21 Dec 2018 13:14:24 +0000 (14:14 +0100)
Instead of using <style> with import, set an explicit link like we do
for other stylesheets. This will make it possible to turn on a content
security policy for CSS.

templates/base/base.html
templates/docs/docspage.html

index 3d4214e470e0729cd6c485e4c2f8f6663bc2bd98..a1d3f72a916c3f66e573ab4616fc209c62359301 100644 (file)
@@ -18,7 +18,7 @@
     {%endfor%}
     <link rel="alternate" type="application/rss+xml" title="PostgreSQL Events" href="/events.rss" />
   {%endif%}
-  <style type="text/css" media="screen" title="Normal Text">@import url("/dyncss/base.css?{{gitrev}}");</style>
+    <link rel="stylesheet" type="text/css" href="/dyncss/base.css?{{gitrev}}">
   {%block extrahead%}{%endblock%}
   </head>
   <body>
index a5ec65e3aabc86edb22285340472d2f1f5b2f085..4e19e8fb580389f74fc9a06f54bce58d85e5a407 100644 (file)
@@ -18,7 +18,7 @@
     {%endfor%}
     <link rel="alternate" type="application/rss+xml" title="PostgreSQL Events" href="/events.rss" />
   {%endif%}
-  <style type="text/css" media="screen" title="Normal Text">@import url("/dyncss/base.css?{{gitrev}}");</style>
+    <link rel="stylesheet" type="text/css" href="/dyncss/base.css?{{gitrev}}">
   {%block extrahead%}{%endblock%}
   </head>
   <body>