Occasionally it is desirable to have list items with long text labels wrap. For example:
(The text indentation and icon floating to the left are a separate feature of my own, not included here)
To accomplish this I created some custom CSS in my app, but I figure it would be a good feature to add to the framework, considering how generally reusable it could be.
I added this CSS to my app:
.wrapping-list .item-content, .wrapping-list .item {
overflow: initial;
white-space: initial;
}
And then declare the list with the wrapping-list
class:
<list class="wrapping-list"></list>
If it’s something you’d be willing to accept, I could send a pull request with these additions.
Indeed, that’s it! Thanks. I’ve added
class="item-text-wrap"
to my items and it works as expected.now (v2) it is done by utitlity attribute:
text-wrap
example:
<ion-item text-wrap>foo</ion-item>
http://ionicframework.com/docs/theming/css-utilities/#text-transformation