mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(segment): add styles for in a color toolbar
This commit is contained in:
@ -72,3 +72,20 @@
|
|||||||
font-size: $segment-button-ios-toolbar-font-size;
|
font-size: $segment-button-ios-toolbar-font-size;
|
||||||
line-height: $segment-button-ios-toolbar-line-height;
|
line-height: $segment-button-ios-toolbar-line-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host(.in-color-toolbar) {
|
||||||
|
--ion-color-base: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(.in-color-toolbar) ::slotted(ion-segment-button) {
|
||||||
|
--border-color: currentColor;
|
||||||
|
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(.in-color-toolbar) ::slotted(ion-segment-button.segment-checked) {
|
||||||
|
--background: #{current-color(contrast)};
|
||||||
|
--border-color: #{current-color(contrast)};
|
||||||
|
|
||||||
|
color: #{current-color(base)};
|
||||||
|
}
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
color: #{current-color(base)} !important;
|
color: #{current-color(base)} !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host(.in-color-toolbar) {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
:host(.segment-disabled) {
|
:host(.segment-disabled) {
|
||||||
opacity: $segment-md-opacity-disabled;
|
opacity: $segment-md-opacity-disabled;
|
||||||
|
|
||||||
|
@ -81,7 +81,8 @@ export class Segment {
|
|||||||
...createColorClasses(this.color),
|
...createColorClasses(this.color),
|
||||||
|
|
||||||
'segment-disabled': this.disabled,
|
'segment-disabled': this.disabled,
|
||||||
'in-toolbar': hostContext('ion-toolbar', this.el)
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
||||||
|
'in-color-toolbar': hostContext('ion-toolbar.ion-color', this.el)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user