I have a div that contains 2 "heading" style texts and 2 paragraph style texts. I would like the second paragraph style text to end with an ellipsis should it be too large. The div is a set size, but the length of each paragraph could be different. Example image as follows
How can I accomplish this? I am aware of the line-clamp
css setting, but the line numbers are variable.
Note: this is being built for a PDF that is paper sized, so that's the reason why the length is set. Also note that weasyprint, the PDF builder, generates from HTML and CSS without the use of JS.
Note 2: It is not a duplicate of questions that ask for exact number of lines. Clamping on 4 lines is already understood by me. It is the fact that the div has a set height with multiple different p tags of which two have a varying height.