W3C home > Mailing lists > Public > www-style@w3.org > January 2009

RE: [css3-linebox] aligning lines

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Fri, 2 Jan 2009 18:49:42 -0800
To: Håkon Wium Lie <howcome@opera.com>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <7C2F64B551D8664AAD94A28DAC37D0206B533346D0@NA-EXMSG-C103.redmond.corp.microsoft.com>

It is tempting to use 'line-height' as 'grid-height'. But what do we want to happen if the two properties inherit independently and a nested block overrides 'line-height'? Does it start a nested grid?

In this example:

	<body style="... defines line grid of 12pt ...">
	... a lot of text ...
	<h2 style="line-height:18pt">heading with more than one line</h2>
	... a lot of text ...

Do we expect lines in H2 to be spaced at 18pt or 24pt? My understanding of the intent of line grid is that taller lines are placed at multiples of normal lines (24pt in this case). That also matches what JLTF describes as preferred layout grid for Japanese text.

I could be argued that authors shouldn't set an explicit line-height if they don't want to affect grid alignment. But I see a potential for confusion here... It would be easier to define and use if grid-height was defined separately.

-----Original Message-----
From: Håkon Wium Lie [mailto:howcome@opera.com] 
Sent: Friday, January 02, 2009 3:04 PM
To: Alex Mogilevsky
Cc: Håkon Wium Lie; Tab Atkins Jr.; L. David Baron; www-style@w3.org
Subject: RE: [css3-linebox] aligning lines

Also sprach Alex Mogilevsky:

 > If you had something like this:
 >         body { line-grid-height: 1.2em; }
 >         body * { line-stacking-strategy: line-grid; }
 > where 'line-grid-height' is not inheritable, and 'line-grid'
 > stacking places lines at multiples of line-grid-height' *relative
 > to the nearest block that has the 'line-grid-height' set*. This way
 > it will really guarantee that lines align across columns or pages.

Yes, a new value on 'line-stacking-strategy' could be a solution.

 > (I made up a new property 'line-grid' here which probably should be
 > 'grid-height', but I don't fully understand the intention of
 > 'grid-height' to say it should be redefined this way).

(I assume you mean "value" instead of "property" above)

I read the description of 'grid-heght' to mean the same as your
example above, excelt the 'line-grid-height' is automatically set to
the value of 'line-height'. So you would say:

    body { line-height: 12pt } /* or something */
    body { line-stacking-strategy: grid-height }

and everything -- body text, headlines, images -- will be alinged on a
baselines that are 12 points apart.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Saturday, 3 January 2009 02:50:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:23 UTC