Skip to content

Fixes button.secondaryBorder theme token discarded for secondary buttons#293241

Open
EmrecanKaracayir wants to merge 2 commits intomicrosoft:mainfrom
EmrecanKaracayir:emrecankaracayir/secondary-button-border
Open

Fixes button.secondaryBorder theme token discarded for secondary buttons#293241
EmrecanKaracayir wants to merge 2 commits intomicrosoft:mainfrom
EmrecanKaracayir:emrecankaracayir/secondary-button-border

Conversation

@EmrecanKaracayir
Copy link
Contributor

Fixes: #293240

Copilot AI review requested due to automatic review settings February 5, 2026 23:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to fix issue #293240 where the button.secondaryBorder theme token was not being used for secondary buttons. The issue reported that secondary buttons were incorrectly using the button.border theme token instead of button.secondaryBorder.

Changes:

  • Added buttonSecondaryBorder to the imports from colorRegistry.ts
  • Modified the buttonBorder property mapping in defaultButtonStyles to use buttonSecondaryBorder theme token

Comment on lines +54 to 55
buttonSecondaryBorder: asCssVariable(buttonSecondaryBorder),
buttonBorder: asCssVariable(buttonBorder),
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mapping between button border properties and theme tokens is incorrect. Both lines have the wrong theme tokens assigned:

  • Line 54 maps buttonSecondaryBorder property to buttonBorder theme token, but it should map to buttonSecondaryBorder theme token
  • Line 55 maps buttonBorder property to buttonSecondaryBorder theme token, but it should map to buttonBorder theme token

According to button.ts lines 233-241, secondary buttons use the buttonSecondaryBorder property while primary buttons use the buttonBorder property. Following the pattern established for other button properties (where property names match theme token names), the correct mapping should be:

buttonSecondaryBorder: asCssVariable(buttonSecondaryBorder),
buttonBorder: asCssVariable(buttonBorder),

The current code will cause primary buttons to use the button.secondaryBorder theme token and secondary buttons to use the button.border theme token, which is the opposite of what's intended.

Copilot uses AI. Check for mistakes.
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.

button.secondaryBorder token discarded for secondary buttons

2 participants