Commit fcbf93f8 by Robb Hamilton Committed by GitHub

Merge pull request #72 from rhamilto/line-clamp

Adding line-clamp mixin
parents f0ec0ab9 1051cbbb
// origin-web-common mixins
// DESCRIPTION: Limits text to x number of lines and adds an ellipsis to the
// end of the truncated line in webkit-based browsers
.line-clamp(@lines: 1, @line-height: @line-height-base) {
display: -webkit-box;
line-height: @line-height;
max-height: (1em * @line-height * @lines);
overflow: hidden;
padding: 0 !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: @lines;
}
// word-break and word-break-all test cases http://codepen.io/sg00dwin/pen/WwKMmP
//
// DESCRIPTION: Breaks long non-breaking strings within a div or a flexed item that is within a flex container
......
// origin-web-common mixins
// DESCRIPTION: Limits text to x number of lines and adds an ellipsis to the
// end of the truncated line in webkit-based browsers
.line-clamp(@lines: 1, @line-height: @line-height-base) {
display: -webkit-box;
line-height: @line-height;
max-height: (1em * @line-height * @lines);
overflow: hidden;
padding: 0 !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: @lines;
}
// word-break and word-break-all test cases http://codepen.io/sg00dwin/pen/WwKMmP
//
// DESCRIPTION: Breaks long non-breaking strings within a div or a flexed item that is within a flex container
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment