Skip to content

Commit 8009bfe

Browse files
committed
fix(select-popover): adjust the width to the option content
1 parent 968103a commit 8009bfe

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

core/src/components/popover/popover.common.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,16 @@
133133
// --------------------------------------------------
134134

135135
:host(.select-popover-rich-content) {
136-
--width: max-content;
136+
/**
137+
* Rich content options (start/end slots, descriptions) need
138+
* more horizontal space than the default fixed width provides,
139+
* otherwise content gets cut off.
140+
*
141+
* A viewport-relative value is used instead of `auto` or
142+
* `max-content` because the enter animation reads `--width`
143+
* via getBoundingClientRect() before the first layout pass
144+
* completes — intrinsic values return 0 at that point and
145+
* cause the popover to be positioned off-screen on first open.
146+
*/
147+
--width: clamp(250px, calc(100vw - 40px), 400px);
137148
}

core/src/components/select-popover/select-popover.common.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ ion-label {
3131
align-items: center;
3232
}
3333

34+
.select-option-label-text {
35+
display: flex;
36+
37+
flex-wrap: wrap;
38+
}
39+
3440
.select-option-description {
3541
display: block;
3642
}

0 commit comments

Comments
 (0)