Skip to content

feat(button-group): update button group styles and implement new properties#17178

Open
didimmova wants to merge 1 commit intomasterfrom
didimmova/update-button-group-theme
Open

feat(button-group): update button group styles and implement new properties#17178
didimmova wants to merge 1 commit intomasterfrom
didimmova/update-button-group-theme

Conversation

@didimmova
Copy link
Copy Markdown
Contributor

Closes #16992

Test with this theming PR

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

Copilot AI review requested due to automatic review settings April 9, 2026 05:32
Copy link
Copy Markdown
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

Updates the Button Group component theme styles to match the refactored state colors requested in #16992 (Material/Fluent/Bootstrap/Indigo), simplifying state styling and introducing new state-specific tokens.

Changes:

  • Removes the overlay-based styling approach and consolidates hover/active/focus state styling to use solid backgrounds.
  • Updates focus and selected focus styling, including additional hover/active handling under focused states.
  • Alters item separation behavior for Fluent by replacing the -1px overlap with border removal.

Comment on lines +61 to +65
@if $variant != 'fluent' {
margin-inline-start: rem(-1px);
} @else {
border-inline-start: 0;
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

For the Fluent variant, switching from margin-inline-start: -1px to border-inline-start: 0 removes the start border on all items except the first. This means hover/active border-color changes on a non-first item can’t affect the shared border between it and the previous item (that border is now always painted by the previous item), leading to inconsistent borders during state changes. Consider keeping the 1px overlap approach (and using z-index on hover/active if needed) or otherwise ensuring the shared separator border color updates with the hovered/active item.

Suggested change
@if $variant != 'fluent' {
margin-inline-start: rem(-1px);
} @else {
border-inline-start: 0;
}
margin-inline-start: rem(-1px);

Copilot uses AI. Check for mistakes.
igx-icon {
color: var-get($theme, 'item-selected-icon-color');
@if $variant != 'indigo' {
border-color: var-get($theme, 'item-selected-border-color');
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In the selected+focused state, the :hover branch for non-indigo sets border-color back to item-selected-border-color, while the base focused state uses item-selected-hover-border-color and the :active branch also uses item-selected-hover-border-color. This makes the border color regress when hovering a focused selected item. Align the focused+hover border color with the intended token (likely item-selected-hover-border-color, or introduce a dedicated focused-hover border token if needed).

Suggested change
border-color: var-get($theme, 'item-selected-border-color');
border-color: var-get($theme, 'item-selected-hover-border-color');

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button Group component: Colors Refactoring in Material, Fluent and Bootstrap

5 participants