Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Java-于龙
origin-web-common
Commits
fcbf93f8
Commit
fcbf93f8
authored
May 17, 2017
by
Robb Hamilton
Committed by
GitHub
May 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72 from rhamilto/line-clamp
Adding line-clamp mixin
parents
f0ec0ab9
1051cbbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
_mixins.less
dist/less/_mixins.less
+12
-0
_mixins.less
src/styles/_mixins.less
+12
-0
No files found.
dist/less/_mixins.less
View file @
fcbf93f8
// 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
...
...
src/styles/_mixins.less
View file @
fcbf93f8
// 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment