From 0cf790508a608ee9137a9b3e68e00a3157da760b Mon Sep 17 00:00:00 2001
From: Nuno Alexandre <nuno@channable.com>
Date: Mon, 5 Feb 2018 21:35:22 +0100
Subject: Add an initial-scale property to all haddock pages

This solves an issue reported about the content looking
incredibly small on mobile devices.
---
 haddock-api/src/Haddock/Backends/Xhtml.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'haddock-api')

diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index e4a0137e..f589e4c9 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -32,7 +32,7 @@ import Haddock.Types
 import Haddock.Version
 import Haddock.Utils
 import Haddock.Utils.Json
-import Text.XHtml hiding ( name, title, p, quote )
+import Text.XHtml hiding ( title, p, quote )
 import Haddock.GhcUtils
 
 import Control.Monad         ( when, unless )
@@ -121,7 +121,8 @@ copyHtmlBits odir libdir themes withQuickjump = do
 headHtml :: String -> Themes -> Maybe String -> Html
 headHtml docTitle themes mathjax_url =
   header << [
-    meta ! [httpequiv "Content-Type", content "text/html; charset=UTF-8"],
+    meta ! [ httpequiv "Content-Type", content "text/html; charset=UTF-8"],
+    meta ! [ name "viewport", content "width=device-width, initial-scale=1"],
     thetitle << docTitle,
     styleSheet themes,
     thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml,
-- 
cgit v1.2.3