-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
Summary
When using the DiscountCard web component, applying text-overflow: ellipsis to the body text does not work as expected — the text overflows instead of truncating. This happens because the body element inside the discount card uses flex layout with the default min-width: auto, preventing it from shrinking to fit the available space.
Steps to Reproduce
- Render a
<DiscountCard>element. - Put long text inside its body section.
- Apply CSS for ellipsis:
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
- Observe that the text does not truncate.
Expected Behavior
Long text in the body section should be correctly truncated and display … when the available width is insufficient.
Actual Behavior
Text overflows its container and breaks the intended layout.
Cause
Flex children with min-width: auto do not shrink smaller than their content's intrinsic size. This prevents truncation from working in flex layouts.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels