I am trying to add ellipsis after a certain number of lines in Chrome. As suggested in various boards, I used the webkit-line-clamp strategy as below
.line-clamp {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
So I do not see the ellipsis at the end of the fourth line to begin with, but if I go into the developer tools and make some random change to the CSS in the element (say change the margin of the element, or check and uncheck one of the properties above), then the ellipsis is seen. This is similar to what was reported in https://bugs.chromium.org/p/chromium/issues/detail?id=265836.
Is there a workaround to this issue? I cannot reproduce this issue in a plain html, it seems to only happen in the application for some inexplicable reason.