Files
ionic-framework/core/src/components/segment/segment.scss
2024-10-11 16:44:21 -04:00

64 lines
998 B
SCSS

@import "../../themes/ionic.globals";
// Segment
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the segment button
*/
--ripple-color: currentColor;
@include font-smoothing();
display: grid;
grid-auto-columns: 1fr;
position: relative;
align-items: stretch;
justify-content: center;
width: 100%;
background: var(--background);
font-family: $font-family-base;
text-align: center;
contain: paint;
user-select: none;
.segment-indicator {
@include transform-origin(left);
position: absolute;
height: 100%;
div {
transition: background-color 0.3s linear;
height: 100%;
}
}
}
// Segment: Scrollable
// --------------------------------------------------
:host(.segment-scrollable) {
justify-content: start;
width: auto;
overflow-x: auto;
grid-auto-columns: minmax(min-content, 1fr);
}
:host(.segment-scrollable::-webkit-scrollbar) {
display: none;
}