RE: [css3-linebox] aligning lines

I guess it's equivalent. When I think about how to implement this, I know I will have to establish a grid and the owner of the grid -- just like defining a positioning container. When I place a line, it doesn't really matter what the value of grid-height is, it matters who owns the grid, so the value that is technically inherited for the fancy name line-stacking-strategy:grid-height is "nearest ancestor element which chose to define a line stacking strategy". Kind of like absolute positioning (to position an element, I have to find the containing block).

So for full definition of line stacking that involves line grid, we'll need
- property+value 'line-stacking-strategy:grid-height'
- add text to definition of "containing block" to the extent of for the purposes of line stacking, containing block is the nearest parent with line-stacking-strategy:grid-height
- the above may make special cases for floats and absolute positioning.

Is that what you are thinking?

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

Also sprach Alex Mogilevsky:

 > 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.

Yes, it should be possible to enforce the 12pt-based grid. I think
it's possible to do so with this markup:

   body { line-height: 12pt }
   body { line-stacking-strategy: grid-height }

That is, the grid is set based on the line-height of the element where
'line-stacking-strategy: grid-height' is set. Subsequent changes in
line-height (say, on h2) doesn't change the grid.

No?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Saturday, 3 January 2009 07:21:06 UTC