Skip to content

Instantly share code, notes, and snippets.

@pbroschwitz
Forked from anselmh/dabblet.css
Created June 4, 2013 10:36
Show Gist options
  • Save pbroschwitz/5705045 to your computer and use it in GitHub Desktop.
Save pbroschwitz/5705045 to your computer and use it in GitHub Desktop.
Untitled
.overflowed > p{
width: 10em;
height: 5rem;
white-space: pre-line;
overflow: hidden;
outline: 1px dashed lime;
}
.overflowed-clip {
text-overflow: clip;
}
.overflowed-ellipsis > p {
text-overflow: ellipsis;
}
.overflowed-ellipsis-word > p {
text-overflow: ellipsis-word;
}
<!-- example showing text-overflow shorthand property -->
<div class="overflowed overflowed-clip"><p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p></div>
<div class="overflowed overflowed-ellipsis"><p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p></div>
<div class="overflowed overflowed-ellipsis-word"><p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment