UNPKG

@ionic/core

Version:
66 lines (54 loc) 2.32 kB
:host { --indicator-color-checked: initial; --ripple-color: initial; --color-activated: initial; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; display: flex; align-items: center; justify-content: center; width: 100%; font-family: var(--ion-font-family, inherit); text-align: center; } :host(.segment-disabled), ::slotted(.segment-button-disabled) { pointer-events: none; } :host(.segment-scrollable) { justify-content: start; width: auto; overflow-x: scroll; } :host(.segment-scrollable::-webkit-scrollbar) { display: none; } :host { --background: none; --background-checked: none; --background-hover: rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.04); --background-activated: rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.16); --color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6); --color-checked: var(--ion-color-primary, #3880ff); --color-checked-disabled: var(--color-checked); --indicator-color: transparent; } :host(.segment-disabled) { opacity: 0.3; } :host(.ion-color)::slotted(ion-segment-button) { --background-hover: rgba(var(--ion-color-base-rgb), 0.04); --background-activated: rgba(var(--ion-color-base-rgb), 0.16); --ripple-color: var(--ion-color-base); background: transparent; color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6); } :host(.ion-color)::slotted(.segment-button-checked) { --indicator-color-checked: var(--ion-color-base); color: var(--ion-color-base); } :host(.ion-color)::slotted(.segment-button-checked.activated) { color: var(--ion-color-base); } :host-context(ion-toolbar):not(.ion-color)::slotted(ion-segment-button) { color: var(--ion-toolbar-color-unchecked, var(--color)); } :host-context(ion-toolbar):not(.ion-color)::slotted(.segment-button-checked) { --indicator-color-checked: var(--ion-toolbar-color-checked, var(--color-checked)); color: var(--ion-toolbar-color-checked, var(--color-checked)); } :host-context(ion-toolbar.ion-color):not(.ion-color)::slotted(ion-segment-button) { --background-hover: rgba(var(--ion-color-contrast-rgb), 0.04); --background-activated: var(--ion-color-base); --color: rgba(var(--ion-color-contrast-rgb), 0.6); --color-checked: var(--ion-color-contrast); --indicator-color-checked: var(--ion-color-contrast); }