2

I am using Vuetify v-list component. I have a bit longer text to display within the v-list-item-subtitle component. This text is not fully visible:

enter image description here

To avoid this issue, I used what I use in similar situations successfully: I opt to apply a class with the CSS property word-wrap set to break-word:

.wrap-text {
  word-wrap: break-word;
}

used this way:

<v-list-item-subtitle v-html="item.subtitle" class="wrap-text"></v-list-item-subtitle>

This does not fix the issue. I noticed the same behavior when I use v-list-item-title.

Codepen

htmn
  • 1,505
  • 2
  • 15
  • 26
Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130

2 Answers2

17

There is a webkit-line-clamp property on the v-list-item__subtitle. Try

.wrap-text {
  -webkit-line-clamp: unset !important;
}

For v-list-item__title use white-space: normal;

htmn
  • 1,505
  • 2
  • 15
  • 26
5

I am using Vuetify but the above answers didn't work for me. But white-space: normal; worked.

.wrap-text {
   white-space: normal;
}

add the class to v-list-item-substitle component.

<v-list-item-subtitle v-html="item.subtitle" class="wrap-text"></v-list-item-subtitle>
Dharman
  • 30,962
  • 25
  • 85
  • 135
Sankha Karunasekara
  • 1,636
  • 18
  • 19