Skip to content

[Theme][macOS] Adding hover tokens#2243

Merged
DanielMorM merged 1 commit into
microsoft:mainfrom
DanielMorM:user/damoral/colortokens/adding-hover-tokens-macos
Feb 6, 2026
Merged

[Theme][macOS] Adding hover tokens#2243
DanielMorM merged 1 commit into
microsoft:mainfrom
DanielMorM:user/damoral/colortokens/adding-hover-tokens-macos

Conversation

@DanielMorM

@DanielMorM DanielMorM commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Adds hover state color tokens for macOS backgrounds. These tokens are marked as unavailable on iOS, visionOS, and macCatalyst since hover interactions are specific to pointer-based platforms.

FluentTheme+Tokens.swift

  • Added 6 new ColorToken enum cases for hover states:
    • background1Hover, background2Hover, background3Hover, background5Hover
    • brandBackground1Hover, brandBackground2Hover
    • All new hover tokens are marked @available(iOS, unavailable), @available(visionOS, unavailable), @available(macCatalyst, unavailable)

FluentTheme+macOS.swift

  • Added color implementations for the new hover tokens with light/dark mode values
  • Updated brandBackground2 and brandBackground2Pressed to include dark mode values (previously only had light mode)

TestAliasColorTokensViewController.swift (macOS Demo)

  • Added new hover tokens to the demo sections for neutral backgrounds and brand backgrounds
  • Added display names and text color handling for the new tokens

Binary change

(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)

Verification

  • Manual testing via the macOS demo app which now displays all new hover tokens
  • Visual verification of hover token colors in light and dark mode
Visual Verification image image

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@DanielMorM DanielMorM requested a review from a team as a code owner February 5, 2026 21:37
@DanielMorM DanielMorM merged commit 9500f4c into microsoft:main Feb 6, 2026
7 checks passed
@joannaquu joannaquu mentioned this pull request Jul 9, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants