Skip to content

Commit aa61e81

Browse files
authored
fix(segment): height fits content (#16511)
* fix(segment): height fits content * fix segment
1 parent 2d33c63 commit aa61e81

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

core/src/components/segment-button/segment-button.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
flex: 1 0 auto;
4747
flex-direction: column;
4848

49-
height: 100%;
49+
height: auto;
5050

5151
border-width: var(--border-width);
5252
border-style: var(--border-style);
@@ -92,7 +92,7 @@
9292

9393
min-width: inherit;
9494
max-width: inherit;
95-
height: 100%;
95+
height: auto;
9696

9797
min-height: inherit;
9898
max-height: inherit;

core/src/components/segment/segment.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
display: flex;
1010

11-
flex: 1;
1211
align-items: center;
1312
justify-content: center;
1413

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
2+
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
3+
<script src="../../../../../dist/ionic.js"></script>
4+
5+
<ion-segment>
6+
<ion-segment-button value="all" checked>
7+
<ion-label>
8+
All
9+
</ion-label>
10+
</ion-segment-button>
11+
<ion-segment-button value="favorites">
12+
<ion-label>
13+
Favorites
14+
</ion-label>
15+
</ion-segment-button>
16+
</ion-segment>

0 commit comments

Comments
 (0)