mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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
This commit is contained in:
@@ -64,18 +64,18 @@
|
||||
}
|
||||
|
||||
// Segment Button: Checked
|
||||
// All slot content should have the checked color even when it's not label or icon
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.segment-button-checked) ::slotted(ion-label),
|
||||
:host(.segment-button-checked) ::slotted(ion-icon) {
|
||||
:host(.segment-button-checked) ::slotted(*) {
|
||||
color: var(--color-checked);
|
||||
}
|
||||
|
||||
// Segment Button: Disabled
|
||||
// All slot content should have the disabled color even when it's not label or icon
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.segment-button-disabled) ::slotted(ion-label),
|
||||
:host(.segment-button-disabled) ::slotted(ion-icon) {
|
||||
:host(.segment-button-disabled) ::slotted(*) {
|
||||
color: var(--color-disabled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user