From 091263ea05c612c31f282ed8a2862a3a5e3a535b Mon Sep 17 00:00:00 2001 From: Shinigami Date: Tue, 29 Nov 2022 17:27:35 +0100 Subject: [PATCH] feat: prevent arbitrary zooming on mobile devices (#234) --- nuxt.config.ts | 4 ++++ styles/global.css | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 264098c1..edb3cc66 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -69,6 +69,10 @@ export default defineNuxtConfig({ }, app: { keepalive: true, + head: { + // Prevent arbitrary zooming on mobile devices + viewport: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no', + }, }, i18n: { locales: [ diff --git a/styles/global.css b/styles/global.css index 407e1b23..60e50cfb 100644 --- a/styles/global.css +++ b/styles/global.css @@ -123,3 +123,8 @@ html.dark { html { --at-apply: bg-base text-base; } + +body { + /* Prevent arbitrary zooming on mobile devices */ + touch-action: pan-x pan-y; +}