Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add truncate component #32

Merged
merged 14 commits into from
Nov 6, 2018
Merged

Add truncate component #32

merged 14 commits into from
Nov 6, 2018

Conversation

luca-rath
Copy link
Contributor

Adds a component which truncates an element's text to the element's height.

Set overflow: hidden and e.g. line-height: 20px and max-height: calc(20px * 3) to the components element to truncate the text of that element to 3 lines.

This component also works with responsive breakpoints.

A custom separator can be defined in the options. e.g. { separator: '!!!' }
A custom debounceDelay for the window resize function can also be set in the options. e.g. { debounceDelay: 500 }

@thomasduenser
Copy link

Code looks good. What about a usage documentation (like the description of this merge request) inside the JS component? I would also prefer comments containing a short description for each method. else ACK

@luca-rath
Copy link
Contributor Author

looks good? @thomasduenser

@thomasduenser
Copy link

@luca-rath ACK

@alexander-schranz alexander-schranz merged commit ef45be5 into sulu:master Nov 6, 2018
@luca-rath luca-rath deleted the patch-2 branch November 6, 2018 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants