I have a card with a title, an input field, and a description, I'm only showing 3 lines of description on the card and truncating if there are more. I'm also showing a tooltip saying 'click to expand' which implies if the user clicks on the card it will expand showing the complete description if the description is more than 3 lines. I want to not show the tooltip when the complete description is showing up in the default state i.e. the description is less than 3 lines. The issue is the card is responsive so is the area of the description so I can't think of a way to know when the complete description is showing up without expanding
I'm using this CSS to truncate the description
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;