From c3f38aea21fd2e5e3df13b35785be3aca804f554 Mon Sep 17 00:00:00 2001 From: Simeon Simeonoff Date: Wed, 25 Nov 2026 16:31:38 +0200 Subject: [PATCH] fix(label): keep label styles off igxButton - 21.2.x --- CHANGELOG.md | 7 +++++++ .../src/core/styles/components/label/_label-component.scss | 3 ++- .../src/core/styles/components/label/_label-theme.scss | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362e3e233bf..7a70286ed71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes for each version of this project will be documented in this file. +## 21.2.28 + +### Bug Fixes + +- `IgxButtonDirective` + - Buttons that use `igxLabel` no longer receive the label styles of `IgxLabelDirective`, such as its text color (#18009). + ## 21.2.27 ### Bug Fixes diff --git a/projects/igniteui-angular/core/src/core/styles/components/label/_label-component.scss b/projects/igniteui-angular/core/src/core/styles/components/label/_label-component.scss index 8de49ebc668..2152babcac9 100644 --- a/projects/igniteui-angular/core/src/core/styles/components/label/_label-component.scss +++ b/projects/igniteui-angular/core/src/core/styles/components/label/_label-component.scss @@ -10,7 +10,8 @@ $deps: () ); - [igxLabel] { + // igxButton has an igxLabel input of its own, so keep label styles off buttons. + [igxLabel]:where(:not(.igx-button)) { @extend %label-base !optional; } } diff --git a/projects/igniteui-angular/core/src/core/styles/components/label/_label-theme.scss b/projects/igniteui-angular/core/src/core/styles/components/label/_label-theme.scss index 99ac7c9c939..5994d3c9457 100644 --- a/projects/igniteui-angular/core/src/core/styles/components/label/_label-theme.scss +++ b/projects/igniteui-angular/core/src/core/styles/components/label/_label-theme.scss @@ -8,7 +8,8 @@ @mixin label($theme) { // The --variant CSS produced by css-vars is needed also // when dynamically switching between the input `type` attribute. - @include css-vars($theme, '[igxLabel]'); + // igxButton has an igxLabel input of its own, so keep label styles off buttons. + @include css-vars($theme, '[igxLabel]:where(:not(.igx-button))'); $variant: map.get($theme, '_meta', 'theme');