From 5c2802a9b4070c45a98550a015372af015aa627f Mon Sep 17 00:00:00 2001
From: Oleg Orlov <efender@users.noreply.github.com>
Date: Fri, 13 Feb 2015 05:07:48 +0200
Subject: [PATCH] Update template.html

fix viewport for high pixel density displays
---
 docs/_includes/getting-started/template.html | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/docs/_includes/getting-started/template.html b/docs/_includes/getting-started/template.html
index 6f45c3dd0e..fbe2ba2fde 100644
--- a/docs/_includes/getting-started/template.html
+++ b/docs/_includes/getting-started/template.html
@@ -10,7 +10,19 @@
   <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">
+
+    <script>
+        // fix viewport for high pixel density displays
+        +function() {
+            var scale = 1 / (window.devicePixelRatio || 1);
+            if ( scale < 1 ) {
+                document.getElementById( 'viewport' ).setAttribute( 'content',
+                    'width=device-width, initial-scale=' + scale + ', minimum-scale=' + scale );
+            }
+        }();
+    </script>
+    
     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
     <title>Bootstrap 101 Template</title>
 
-- 
GitLab