mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
64 lines
998 B
SCSS
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;
|
|
}
|