From 931730a72c012d7ea5cea18f91bfda5e2dc7c669 Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Fri, 22 Nov 2024 08:29:44 +0000 Subject: [PATCH] [FIX] composer: overflow on composer at end of screen The button to close the composer's formula assistant would overflow from the viewport and make an additional scrollbar appear when it's at the end of the screen (eg. standalone composer in the CF color scale panel). This was due to two things: 1) there was a comment with `//`, which is invalid css and disabled the `width` property of the button 2) we were using a `CLOSE_ICON_RADIUS` to compute the position of the formula assistant. But this constant wasn't actually used in the CSS, so the button could have an arbitrary width unrelated to the constant. (in practice it was 18.4px vs 18px, but this would change if we changed the font size). Task: 4315958 X-original-commit: 434c06097221d1f0555780bed134a81f1d58ec58 --- src/components/composer/composer/composer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/composer/composer/composer.ts b/src/components/composer/composer/composer.ts index 2fc692a806..17a170a5db 100644 --- a/src/components/composer/composer/composer.ts +++ b/src/components/composer/composer/composer.ts @@ -86,10 +86,10 @@ css/* scss */ ` } .fa-stack { - // reset stack size which is doubled by default - width: 1em; - height: 1em; - line-height: 1em; + /* reset stack size which is doubled by default */ + width: ${CLOSE_ICON_RADIUS * 2}px; + height: ${CLOSE_ICON_RADIUS * 2}px; + line-height: ${CLOSE_ICON_RADIUS * 2}px; } .force-open-assistant {