-
Notifications
You must be signed in to change notification settings - Fork 25
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 lines property to d2l-collapsible-panel-summary-item. #3792
Conversation
…uncating at specified number of lines.
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
|
'd2l-skeletize': true, | ||
'truncate': this.lines > 0 | ||
}; | ||
const styles = (this.lines > 0) ? { '-webkit-line-clamp': this.lines } : {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't we adding this rule in the truncate
definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because the value is coming from the consumer-specified attribute. We could set a CSS variable in one of the life cycle methods to use in CSS, but seems unnecessary complexity for this one property. It would be amazing if we could just use attr, but it would not work in this context... maybe one day.
Visual diff tests failed - pull request #3793 has been opened with the updated goldens. |
Co-authored-by: github-actions <[email protected]>
🎉 This PR is included in version 2.132.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
US154543
This PR adds an optional
lines
property tod2l-collapsible-panel-summary-item
that enables consumers to specify the number of lines to display before truncating with ellipsis. If no value, or a value less than 1 is specified, it will not truncate as consistent with previous behaviour.Example:
lines="2"