Re:Em Baseline Generator
by joshnh on Tuesday April 02, 2013 @06:45AM
(#5478541)
Hi, creator here. Unfortunately that's not how CSS works. See here for more information: http://joshnh.com/2012/10/12/how-does-line-height-actually-w...
[ Parent
| on HN ]
Re:Em Baseline Generator
by exceptione on Tuesday April 02, 2013 @07:05AM
(#5478591)
I read your article. But i am still wondering why you cant shift the pattern so that the lines really line up with the baseline. You can influence the leading via margin or padding and the line-height property, right?
Absolutely, you can hack it on a very individual basis, but this introduces some major problems. For instance, browsers and operating systems all render fonts differently, and as the web is fluid by nature, simply having a sentence break to the next line can be an issue. Also, it can be incredibly different based on the typefaces you are using.
Re:Em Baseline Generator
by exceptione on Tuesday April 02, 2013 @10:18AM
(#5479369)
then i still don't get it. When a simple line break would break a horizontal baseline-aligned grid, wouldn't it break a horizontal baseline-plus-some-space-aligned grid?
Although the css prop. "line-heigt" is not implemented in a convenient way, it is still deterministic as I understand from the quoted article:
"This is determined by working out the difference between the line-height and the font-size, dividing by 2, and then placing the calculated amount of space above and below each line of text."