Problems with Line-Clamp in Elements

i added some code to a project (text-overflow & line-clamp) - to shorten and punctuate text with CSS.

this works quite well and without any problems as I know it from rapidweaver-classic.

however, as soon as I activate the margin&padding under spacing in the text element of elements, the line clamp is no longer working correctly.

link to the video

link to the project

i would be grateful for any feedback on what I need to change in my settings.