Repository navigation
fix(label): keep label styles off igxButton - 21.2.x - #18062
Merged
Merged
Conversation
kdinev
approved these changes
Nov 25, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the label-style backport.
No open issues 🎉
What changed in this PR
Backports the label-style fix from #18055 to 21.2.x, addressing #18009 without changing button accessibility behavior or deprecating igxLabel.
Changes:
- Excludes
.igx-buttonfrom label base styles and theme tokens using:where(:not(...)), preserving selector specificity. - Documents the button styling fix in the 21.2.28 changelog.
| File | Description |
|---|---|
| projects/igniteui-angular/core/src/core/styles/components/label/_label-theme.scss | Excludes buttons from label theme token styles. |
| projects/igniteui-angular/core/src/core/styles/components/label/_label-component.scss | Excludes buttons from label base styles. |
| CHANGELOG.md | Records the igxLabel button styling fix for 21.2.28. |
Review effort: Balanced
kdinev
enabled auto-merge (squash)
November 25, 2026 14:34
kdinev
disabled auto-merge
November 25, 2026 15:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #18009
Partial backport of #18055 to 21.2.x: only the label style fix.
Description
The label styles (
[igxLabel]base rule, tokens and typography) now skip.igx-button. The selector is[igxLabel]:where(:not(.igx-button)), so specificity stays at (0,1,0).Motivation / Context
The button's
igxLabelinput shares its name with the[igxLabel]selector ofIgxLabelDirective. A button written asigxLabel="...", as the button's JSDoc shows, matched the label CSS. The label rule has the same specificity as the button's resting color rule and comes later, so the button took the label text color. #17990 (in 21.2.27) made this visible in apps that excludeigx-label, because the label styles are now kept when an included component depends on them.The
aria-labelpart of #18009 doesn't apply here: on 21.2.x the button setsaria-labelonly whenigxLabelhas a value and never removes one set in the template. TheigxLabeldeprecation is left out of this patch line.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Button, Theming (label)
How Has This Been Tested?
I compiled the light and dark Material, Indigo, Bootstrap and Fluent presets before and after. Before,
[igxLabel] { color }came after.igx-button--contained { color }. The only changes are the[igxLabel]selectors (base, tokens, RTL and typography rules).npm run test:stylespasses.Test Configuration:
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)