Is there a way to use CSS to set the height of a box based on its own line-height or its parent's line-height?
This feature would make it much simpler to create text areas that are a specific multiple of lines, for example, displaying exactly three lines.
I'm looking for a solution that doesn't involve using JavaScript since those tend to be slow and don't work well with layouts that are dynamically re-rendered.
Edit: The line-heights in my situation are specified as unit-less numbers, following the recommendations on MDN. It would be convenient if line-height units weren't necessary to achieve this functionality.