From 04ba7badf4aa0177b0d484bf70b1dcc6706644c0 Mon Sep 17 00:00:00 2001 From: Jan Drewniak Date: Fri, 28 May 2021 10:05:43 +0200 Subject: [PATCH] Add relative positioning to .mwe-popups-container The Popups UI currently depends on the absolute positioning of the top-level .mwe-popups element to correctly position it's footer. This dependence on absolute positioning makes it difficult to debug Popups in isolation (e.g. in Storybook). Adding relative positioning to the .mwe-popups-container elements maintains the correct footer positioning and removes the need for a specialized layout in Storybook that accommodates absolute positioning. (If changing the Popups layout to accommodate Storybook seems unjustified, just think of it as increasing testability). Bug: T271763 Change-Id: Ifba23afa1a2f401b025476a1fa464c2176fb40ec --- src/ui/templates/popup/popup.less | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/templates/popup/popup.less b/src/ui/templates/popup/popup.less index f5fed2147..cd2b4899a 100644 --- a/src/ui/templates/popup/popup.less +++ b/src/ui/templates/popup/popup.less @@ -46,6 +46,7 @@ margin-top: -9px; padding-top: 9px; text-decoration: none; + position: relative; footer { // T277364: The top padding doesn't have a visible effect anyway; this reduces the risk