From 6b2357061e1b0865673e1c2c45191d2236080c32 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Fri, 28 Oct 2022 16:04:06 +0200 Subject: [PATCH] Use border-box for noVNC panels If we use box-sizing: border-box we can avoid having to account for the padding when calculcating the max-width. --- app/styles/base.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/styles/base.css b/app/styles/base.css index 56d1dcf3..b015b4d7 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -422,7 +422,8 @@ html { transition: 0.5s ease-in-out; - max-width: calc(100vw - 2*15px - 75px - 25px); /* minus padding, and left and right margins */ + box-sizing: border-box; /* so max-width don't have to care about padding */ + max-width: calc(100vw - 75px - 25px); /* minus left and right margins */ max-height: 100vh; /* Chrome is buggy with 100% */ overflow-x: hidden; overflow-y: auto;