Standardize viewport rules for mobile and desktop

Also removes`maximum-scale` on non-mobile devices, better for accessibility.
This commit is contained in:
Penar Musaraj 2019-05-06 10:26:24 -04:00
parent e2e72f4e8e
commit 5e546ba7d1

View File

@ -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 %>