mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix(segment): automatically expand width for scrollable segment buttons (#20763)
fixes #20566
This commit is contained in:
@ -44,6 +44,10 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-native {
|
||||||
|
min-width: $segment-button-md-min-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Segment Button: Disabled
|
// Segment Button: Disabled
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -13,5 +13,5 @@
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
:host(.segment-scrollable) ::slotted(ion-segment-button) {
|
:host(.segment-scrollable) ::slotted(ion-segment-button) {
|
||||||
min-width: $segment-button-md-min-width;
|
min-width: auto;
|
||||||
}
|
}
|
@ -184,6 +184,31 @@
|
|||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
|
|
||||||
|
<!-- Scrollable text -->
|
||||||
|
<ion-segment scrollable color="tertiary" value="heart">
|
||||||
|
<ion-segment-button value="home">
|
||||||
|
This is some long text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="heart">
|
||||||
|
Short text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="pin">
|
||||||
|
This is some long text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="star">
|
||||||
|
Short text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="call">
|
||||||
|
Short text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="globe">
|
||||||
|
Medium long text
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="basket">
|
||||||
|
Medium long text
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
Reference in New Issue
Block a user