Skip to content

Commit 6c74618

Browse files
fix(segment-button): correct color for button childs (#30891)
Issue number: internal <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - guarantee that every child of segment-button has color: primary-color when checked; ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Sample: https://ionic-framework-git-rou-12439-ionic1.vercel.app/src/components/segment/test/basic?ionic:theme=ionic
1 parent 68b6694 commit 6c74618

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/components/segment-button/segment-button.ionic.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@
6464
}
6565

6666
// Segment Button: Checked
67+
// All slot content should have the checked color even when it's not label or icon
6768
// --------------------------------------------------
6869

69-
:host(.segment-button-checked) ::slotted(ion-label),
70-
:host(.segment-button-checked) ::slotted(ion-icon) {
70+
:host(.segment-button-checked) ::slotted(*) {
7171
color: var(--color-checked);
7272
}
7373

7474
// Segment Button: Disabled
75+
// All slot content should have the disabled color even when it's not label or icon
7576
// --------------------------------------------------
7677

77-
:host(.segment-button-disabled) ::slotted(ion-label),
78-
:host(.segment-button-disabled) ::slotted(ion-icon) {
78+
:host(.segment-button-disabled) ::slotted(*) {
7979
color: var(--color-disabled);
8080
}
8181

0 commit comments

Comments
 (0)