W3C home > Mailing lists > Public > www-style@w3.org > March 2016

Re: [css-snap-size][css-line-grid] Sub/superscript line height

From: Alan Stearns <stearns@adobe.com>
Date: Sun, 20 Mar 2016 14:54:51 +0000
To: Chris Sunden <chris.sunden@mail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <7B970660-4CD5-470B-BCE5-E46D8A40187E@adobe.com>
On 3/20/16, 5:57 AM, "Chris Sunden" <chris.sunden@mail.com> wrote:

>Are CSS Line Grid [1] or CSS Step Sizing [2][3] addressing the problem of line-heights growing when sub/superscript is used [4]?
> 
>Wouldn’t the proposals create even more empty space around sub/superscripts? Could the proposals be fixed to address the sub/superscript problem?

Yes, both line grid and step sizing “fix” unexpected increases in line height by adding more space between lines. The way to use sub/superscripts (either in the baseline grid or in the step size) is to *expect* the small variation in line-height, and make the grid or step size large enough to accommodate the variation.

> 
>Alternatively, would a fixed line height solve the problem? That was proposed earlier to look like this: line-height-style: variable | fixed [5]. 

A fixed line height would also need to be large enough to accommodate sub/superscripts. Otherwise you’re just trading off one problem for another. If the variable line-height is too small, sub/superscripts increase the height and break vertical rhythm. If the fixed line-height is too small, sub/superscripts will collide with the line above or below. So the ‘solution’ for sub/superscripts is the same for fixed line height, baseline grids and step sizing - start with a line-height that’s large enough.


>It would work great with sub/superscripts and could be used to create simple baseline grids, too. 

The main problem I see on the web with vertical rhythm has to do with headers [1]. A reasonable line-height for a multi-line header is never a strict multiple of a paragraph’s line height. And you can’t know in advance whether a header is going to be a single line or break into two or three lines. Better control over line height doesn’t solve this problem, but a baseline grid does.

Thanks,

Alan

[1] http://blogs.adobe.com/webplatform/2014/02/05/baseline-grids-for-the-web/

Received on Sunday, 20 March 2016 14:55:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC