Getting this effect with CSS it's easy:
This is a very long para...
We just just use text-overflow:ellipsis
.
However the reverse
... is a very long paragraph.
seems less obvious.
I have read this comprehensive article but the solution give there is still less than ideal.
Here's the CSS to implement it
.reverse-ellipsis {
text-overflow: clip;
position: relative;
background-color: white;
}
.reverse-ellipsis:before {
content: '\02026';
position: absolute;
z-index: 1;
left: -1em;
background-color: inherit;
padding-left: 1em;
margin-left: 0.5em;
}
.reverse-ellipsis span {
min-width: 100%;
position: relative;
display: inline-block;
float: right;
overflow: visible;
background-color: inherit;
text-indent: 0.5em;
}
.reverse-ellipsis span:before {
content: '';
position: absolute;
display: inline-block;
width: 1em;
height: 1em;
background-color: inherit;
z-index: 200;
left: -.5em;
}
The main problem with it is its length and the fact that the ellipsis looks a bit off.
Does anyone know of a shorter solution that keeps the ellipsis in line?
United States ▸ Washington State ▸ Ocean Shores ▸ Cop...
vs...tes ▸ Washington State ▸ Ocean Shores ▸ Copalis Beach
– Inundate...168.1.1/file.pdf
than192.168.1.1/f...
. In my opinion question shuld be opened. It's not opinion based at all. – Topsyturvydom