Standardize viewport rules for mobile and desktop

Standardize viewport rules for mobile and desktop

Also removesmaximum-scale on non-mobile devices, better for accessibility.

diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb
index 02bbb01..521be26 100644
--- a/app/views/layouts/_head.html.erb
+++ b/app/views/layouts/_head.html.erb
@@ -8,11 +8,7 @@
 <link rel="apple-touch-icon" type="image/png" href="<%= ::UrlHelper.absolute(site_apple_touch_icon_url) %>">
 <%- end %>
 <meta name="theme-color" content="#<%= ColorScheme.hex_for_name('header_background', scheme_id) %>">
-<% if mobile_view? %>
-<meta name="viewport" content="width=device-width, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
-<% else %>
-<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
-<% end %>
+<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
 <%- if Discourse.base_uri.present? %>
 <meta name="discourse-base-uri" content="<%= Discourse.base_uri %>">
 <% end %>

GitHub sha: 5e546ba7

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: