From a2f8f57ac46c77fc014f556ecabfe5d435d9aed2 Mon Sep 17 00:00:00 2001 From: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Wed, 9 Sep 2026 17:26:57 -0700 Subject: [PATCH] Forced color mode fixes --- stylesheets/components/fun/FunEmoji.scss | 2 + ts/axo/AxoAvatar.dom.tsx | 13 ++++- ts/axo/AxoButton.dom.tsx | 8 +++- ts/axo/AxoContactName.dom.tsx | 4 +- ts/axo/AxoIconButton.dom.tsx | 9 +++- ts/axo/AxoSelect.dom.tsx | 4 +- ts/axo/AxoTooltip.dom.tsx | 17 ++++--- ts/axo/_internal/AxoBaseMenu.dom.tsx | 11 +++-- ts/axo/fields/_AxoBaseField.dom.tsx | 11 +++-- ts/axo/items/AxoContactList.dom.stories.tsx | 53 ++++++++++----------- ts/axo/items/_AxoBaseItem.dom.tsx | 4 +- 11 files changed, 85 insertions(+), 51 deletions(-) diff --git a/stylesheets/components/fun/FunEmoji.scss b/stylesheets/components/fun/FunEmoji.scss index bb1464cd6f..1ee2c5356e 100644 --- a/stylesheets/components/fun/FunEmoji.scss +++ b/stylesheets/components/fun/FunEmoji.scss @@ -27,6 +27,7 @@ .FunStaticEmoji__Text { padding-top: 1px; + font-variant-emoji: emoji; // Emoji font images are slightly higher than optical center @media (resolution >= 2x) { @@ -169,6 +170,7 @@ $inline-emoji-container-name: inline-emoji; // Inline-block so copying multiple emoji does not insert newlines around // each one in the clipboard plain-text serialization. display: inline-block; + font-variant-emoji: emoji; // Emoji font images are slightly higher than optical center @container #{$inline-emoji-container-name} (width > 16px) { diff --git a/ts/axo/AxoAvatar.dom.tsx b/ts/axo/AxoAvatar.dom.tsx index 1a9b2eb0c2..ab8d8cdbce 100644 --- a/ts/axo/AxoAvatar.dom.tsx +++ b/ts/axo/AxoAvatar.dom.tsx @@ -287,6 +287,10 @@ export namespace AxoAvatar { ); @@ -506,7 +515,7 @@ export namespace AxoAvatar { width={256} height={256} viewBox="0 0 256 256" - className={tw('size-full fill-current')} + className={tw('size-full fill-current', 'rounded-full')} style={style} > ('AxoButton.Variant', { diff --git a/ts/axo/AxoContactName.dom.tsx b/ts/axo/AxoContactName.dom.tsx index 773cc006c3..b3899901c2 100644 --- a/ts/axo/AxoContactName.dom.tsx +++ b/ts/axo/AxoContactName.dom.tsx @@ -32,7 +32,9 @@ export namespace AxoContactName { 'size-fit', 'rounded-full', 'leading-none', - 'focus-visible:axo-focus-ring' + 'text-primary', + 'focus-visible:axo-focus-ring', + 'forced-colors:text-[ButtonText]' )} > diff --git a/ts/axo/AxoIconButton.dom.tsx b/ts/axo/AxoIconButton.dom.tsx index 58e0eb3c17..00561eb94d 100644 --- a/ts/axo/AxoIconButton.dom.tsx +++ b/ts/axo/AxoIconButton.dom.tsx @@ -29,10 +29,15 @@ export namespace AxoIconButton { const baseStyles = tw( 'relative rounded-full leading-none', - 'forced-colors:border forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]', 'focus-visible:axo-focus-ring', + 'forced-colors:border', + 'forced-colors:border-[ButtonBorder]', + 'forced-colors:focus:border-[Highlight]', + 'forced-colors:bg-[ButtonFace]', + 'forced-colors:text-[ButtonText]', 'forced-colors:aria-disabled:text-[GrayText]', - 'forced-colors:aria-pressed:bg-[SelectedItem] forced-colors:aria-pressed:text-[SelectedItemText]' + 'forced-colors:aria-pressed:bg-[SelectedItem]', + 'forced-colors:aria-pressed:text-[SelectedItemText]' ); const pressedInvertedStyles = tw( diff --git a/ts/axo/AxoSelect.dom.tsx b/ts/axo/AxoSelect.dom.tsx index f6471ac545..fc9363f6c8 100644 --- a/ts/axo/AxoSelect.dom.tsx +++ b/ts/axo/AxoSelect.dom.tsx @@ -158,8 +158,10 @@ export namespace AxoSelect { 'group relative inline-flex items-center', 'rounded-full text-start type-body-medium font-medium text-primary', 'disabled:text-disabled', + 'focus-visible:axo-focus-ring', 'forced-colors:border', - 'focus-visible:axo-focus-ring' + 'forced-colors:text-[ButtonText]', + 'disabled:forced-colors:text-[GrayText]' ); const TriggerVariants = variants('AxoSelect.TriggerVariant', { diff --git a/ts/axo/AxoTooltip.dom.tsx b/ts/axo/AxoTooltip.dom.tsx index b331f22709..0dc11771f3 100644 --- a/ts/axo/AxoTooltip.dom.tsx +++ b/ts/axo/AxoTooltip.dom.tsx @@ -453,8 +453,8 @@ export namespace AxoTooltip { 'text-primary-oncolor', 'min-w-12', hasAccessory ? 'max-w-[228px]' : 'max-w-[192px]', - 'forced-color-adjust-none', - 'forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]' + 'forced-colors:bg-transparent', + 'forced-colors:text-[HighlightText]' )} onPointerDownOutside={handlePointerDownOutside} > @@ -486,7 +486,8 @@ export namespace AxoTooltip { 'bg-material-dim-primary', 'backdrop-blur-thin', 'rounded-[14px]', - 'shadow-elevation-3 shadow-no-outline' + 'shadow-elevation-3 shadow-no-outline', + 'forced-colors:bg-[Highlight]' )} />