From bcfc8d653b69581cb2ef76930c9bc5d16ef54d3d Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 1 Dec 2020 11:37:00 +0100
Subject: [PATCH] app-shell: prevent the page from shifting when scrollbars get
 added

In the non-mobile mode add a padding to the left if there is a scrollbar.
---
 packages/app-shell/src/app-shell.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js
index 30fa1c45..4edc5fcf 100644
--- a/packages/app-shell/src/app-shell.js
+++ b/packages/app-shell/src/app-shell.js
@@ -441,6 +441,13 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
                 min-height: 100vh;
             }
 
+            /* Prevent the page shifting when vertical scrollbars get added */
+            @media (min-width: 680px) {
+                #main {
+                    padding-left: calc(100vw - 100%);
+                }
+            }
+
             #main-logo {
                 padding: 0 50px 0 0;
             }
-- 
GitLab