mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
fix(segment): fix css var + host-context()
This commit is contained in:
@ -16,6 +16,19 @@
|
||||
opacity: $segment-md-opacity-disabled;
|
||||
}
|
||||
|
||||
// Material Design Segment Button Color
|
||||
// --------------------------------------------------
|
||||
|
||||
:host-context(ion-toolbar.ion-color):not(.ion-color) {
|
||||
--color: currentColor;
|
||||
--color-checked: currentColor;
|
||||
}
|
||||
|
||||
:host(.ion-color)::slotted(.segment-button-checked) {
|
||||
color: #{current-color(base)};
|
||||
}
|
||||
|
||||
|
||||
// Material Design Segment Button
|
||||
// --------------------------------------------------
|
||||
|
||||
@ -26,7 +39,6 @@
|
||||
--padding-start: #{$segment-button-md-padding-start};
|
||||
--border-width: #{0 0 $segment-button-md-border-bottom-width 0};
|
||||
--border-style: solid;
|
||||
--opacity: #{$segment-button-md-opacity};
|
||||
--transition: #{$segment-button-md-transition};
|
||||
--icon-size: #{$segment-button-md-icon-size};
|
||||
|
||||
@ -45,11 +57,6 @@
|
||||
// Checked Segment Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.ion-color) ::slotted(.segment-button-checked) {
|
||||
--background: transparent;
|
||||
--color: #{current-color(base)};
|
||||
}
|
||||
|
||||
::slotted(.activated),
|
||||
::slotted(.segment-button-checked) {
|
||||
opacity: $segment-button-md-opacity-activated;
|
||||
@ -61,11 +68,3 @@
|
||||
::slotted(.segment-button-disabled) {
|
||||
opacity: $segment-button-md-opacity-disabled;
|
||||
}
|
||||
|
||||
// In Toolbar
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.in-color-toolbar:not(.ion-color)) {
|
||||
--color: #{current-color(contrast)};
|
||||
--color-checked: #{current-color(contrast)};
|
||||
}
|
||||
|
Reference in New Issue
Block a user