From 1c8619582319c46c524807aa4bdff1191b2efc91 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 25 Apr 2022 21:46:12 -0700 Subject: [PATCH] fix(css): Fix missing % in calculation (#4157) This bug has always been there, as far as I can tell, since the ads UI was added. This issue was caught by an internal compilation tool and another project that consumes our UI. --- ui/less/ad_controls.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/less/ad_controls.less b/ui/less/ad_controls.less index 92e6259916..83e2a25df5 100644 --- a/ui/less/ad_controls.less +++ b/ui/less/ad_controls.less @@ -78,11 +78,11 @@ /* This math is determining how far the button is from the right edge. * Ad panel's parent is centered and @bottom-controls-width wide, so - * 100 - @bottom-controls-width = margins from both sides of the container. + * 100% - @bottom-controls-width = margins from both sides of the container. * That divided by 2 is margin on one side, so we take that, and move the * button from its normal position to the right by that percentage. */ - right: calc((100 - @bottom-controls-width) / 2 * -1); + right: calc((100% - @bottom-controls-width) / 2 * -1); display: flex; flex-direction: row; margin: 0;