Here's the jsfiddle: jsfiddle.net .html:
<span class="fileName" >long name file to display long name file to displayddddddssdd moreggggg lines more lines more more more lines</span>
.scss:
.fileName {
-webkit-font-smoothing: antialiased;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
font-size: 17px;
line-height: 1.4;
max-height: 71.4px;
overflow:hidden;
display: -webkit-box;
text-overflow: ellipsis;
width: 175px;
}
The text will not wrap or truncate in Firefox. But wraps and shows ellipsis in Safari and Chrome.
Is text-overflow: ellipsis;
supported in Firefox?
I included other parts of scss as I need the text to be shown in 3 lines. So I cannot use display:inline-block
or white-space: nowrap;
property.
Is there a workaround for Firefox ? Thanks.