headings in ion-labels don't inherit overflow and text-overflow
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior:
When nesting a heading (h1
, h2
, …) inside an ion-label
, the overflow: hidden
and text-overflow: ellipsis
attributes don’t get inherited (anymore?).
Expected behavior:
The headings should inherit the proper overflow attributes.
Steps to reproduce/related code:
https://codepen.io/simonhaenisch/pen/JjPXPEq
<ion-list>
<ion-item>
<ion-label>
<h2>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto laborum, voluptatum corporis reprehenderit ipsa nostrum aperiam optio porro? Ipsa pariatur, earum sapiente nihil sed perspiciatis nostrum voluptas ipsum mollitia repellendus.</h2>
</ion-label>
</ion-item>
</ion-list>
Other information:
When setting text-wrap
on the ion-label
, the nested headings get wrapped as well, but setting text-nowrap
still doesn’t apply text-overflow: ellipsis
or overflow: hidden
to the heading.
Ionic info:
@ionic/core@4.0.0-rc.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (10 by maintainers)
Top Results From Across the Web
headings in ion-labels don't inherit overflow and text-overflow
When setting text-wrap on the ion-label , the nested headings get wrapped as well, but setting text-nowrap still doesn't apply text-overflow: ...
Read more >Ion-item text not cutting a long line (text-overflow) properly in ...
Hello guys, i have a different result while developing and in production, when I use ionic serve everything looks ok, the text in...
Read more >Ionic 4 bug: heading text-overflow in label - CodePen
Ionic 5. Labels have text-overflow set to "ellipsis", and paragrahs inherit that, but headings don't. Lorem, ipsum dolor sit amet consectetur adipisicing ...
Read more >Ionic list item text overflow not adjusting the height of the list item
I've included the ionic class "item-text-wrap" at the list level (I've also tried at the item level with the same result) and it...
Read more >ion-text-wrap, Ion-item (click event), ionic text-overflow ellipsis ...
x Current behavior: When nesting a heading (h1, h2, ) inside an ion-label, the overflow: hidden and text-overflow: ellipsis attributes don't get inherited...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@simonhaenisch I believe it would need to be this instead:
but yes I would accept this.
Could you add a test in
label/test/
calledheadings
that is basically the same as your Codepen including the headings and paragraph? I can review and make changes. Thank you for offering to PR this!!@brandyscarney not sure you’ve seen it, I’ve opened a PR for it ☝️