From e59c39d3c5173af103b3ab0aec729b94f79fc9dd Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Tue, 16 Jun 2020 11:05:21 +0200 Subject: [PATCH] Limit the width of the dropdown a bit more It should only span the whole width in mobile mode --- packages/auth/src/auth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/auth/src/auth.js b/packages/auth/src/auth.js index 85e9223c..8f1915ec 100644 --- a/packages/auth/src/auth.js +++ b/packages/auth/src/auth.js @@ -253,7 +253,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { let viewportOffset = this.getBoundingClientRect(); let spaceToRIght = window.innerWidth - viewportOffset.left; - dropdown.setAttribute("style", `width: ${spaceToRIght - 10}px`); + dropdown.setAttribute("style", `width: ${spaceToRIght - 20}px`); } disconnectedCallback() { @@ -319,6 +319,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { .dropdown-menu { display: none; min-width: 5em; + max-width: 25em; position: absolute; z-index: 20; border: solid 1px black; -- GitLab