[css-line-height] Conditional line-height

I default my line-height to 1.5 at the body level so text element that span multiple lines are readable without extra styling. Sometimes though, this has to be reset to 1 when the element spans only one line, otherwise unwanted vertical whitespace is rendered. But with the rise of responsive/flexible designs some elements might span either one or multiple lines and there is no way to set a value for both cases without providing multiple media queries. So I would like to suggest something like:
line-height: 1, 1.5;

I think it is possible to check if an elements height is taller than its own line-height, which is when the second value would be used. Let me know what you think!


Received on Friday, 3 May 2013 12:28:52 UTC