From 5449226da934524c6221e83af17c668fba205cb8 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Tue, 2 Aug 2022 10:03:56 -0700 Subject: [PATCH] Add block-start/end and overflow properties to `popup` These were missing - see [1]. Without at least the block start and end positions, pop-ups could easily be shown off screen below the viewport. [1] https://github.com/openui/open-ui/issues/561#issuecomment-1201766064 Bug: 1307772 Change-Id: I006c664f89e8996d75c74130e4510967acfd486b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3803128 Auto-Submit: Mason Freed Commit-Queue: Joey Arhar Reviewed-by: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1030616} --- html/semantics/popups/resources/popup-styles.css | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/html/semantics/popups/resources/popup-styles.css b/html/semantics/popups/resources/popup-styles.css index 2e603066dfb51a..1a99019f060dfc 100644 --- a/html/semantics/popups/resources/popup-styles.css +++ b/html/semantics/popups/resources/popup-styles.css @@ -2,20 +2,23 @@ position: fixed; inset-inline-start: 0; inset-inline-end: 0; + inset-block-start: 0; + inset-block-end: 0; width: fit-content; height: fit-content; margin: auto; border: solid; + overflow: auto; padding: 1em; - background-color: Canvas; color: CanvasText; + background-color: Canvas; } .fake-pop-up-backdrop { position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset-inline-start: 0; + inset-inline-end: 0; + inset-block-start: 0; + inset-block-end: 0; background: transparent; pointer-events: none !important; }