Skip to content

Commit

Permalink
[FIX] composer: overflow on composer at end of screen
Browse files Browse the repository at this point in the history
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).

closes #5252

Task: 4315958
Signed-off-by: Rémi Rahir (rar) <[email protected]>
  • Loading branch information
hokolomopo committed Nov 22, 2024
1 parent e48b96b commit 434c060
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/composer/composer/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,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 {
Expand Down

0 comments on commit 434c060

Please sign in to comment.