From 46f58541857585964a3c41c2d0edbbbbb7895a89 Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Wed, 3 Jul 2024 11:42:14 -0500 Subject: [PATCH] tippy: Initialize maxWidth in em units. --- web/src/compose_tooltips.ts | 3 ++- web/src/tippyjs.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/compose_tooltips.ts b/web/src/compose_tooltips.ts index 9796461a6f..fcd1f7a1b1 100644 --- a/web/src/compose_tooltips.ts +++ b/web/src/compose_tooltips.ts @@ -240,7 +240,8 @@ export function initialize(): void { // TODO: Might need to target just the Send button itself // in the new design target: ".disabled-message-send-controls", - maxWidth: 350, + // 350px at 14px/1em + maxWidth: "25em", content: () => compose_recipient.get_posting_policy_error_message() || compose_validate.get_disabled_send_tooltip(), diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.ts index d108a9d949..104a102985 100644 --- a/web/src/tippyjs.ts +++ b/web/src/tippyjs.ts @@ -53,7 +53,8 @@ export const EXTRA_LONG_HOVER_DELAY: [number, number] = [1500, 20]; // documentation for default properties. tippy.default.setDefaultProps({ // Tooltips shouldn't take more space than mobile widths. - maxWidth: 300, + // 300px at 14px/1em + maxWidth: "21.4286em", delay: INSTANT_HOVER_DELAY, placement: "top", // Disable animations to make the tooltips feel snappy.