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

RE: [css3-linebox] aligning lines

From: Håkon Wium Lie <howcome@opera.com>
Date: Sat, 3 Jan 2009 00:04:08 +0100
Message-ID: <18782.40296.681640.601838@opera.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: (wrong string) åkon Wium Lie <howcome@opera.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>

Also sprach Alex Mogilevsky:

 > 'line-stacking-strategy' does sound like the right property but its
 > name, but I am not sure the current definition actually guarantees
 > that lines align across pages or columns.

You're right -- the current wording would have to change.

 > It will certainly work
 > when all fonts are of the same size, and in some other special
 > cases, but in general layout, with floats, headings, borders etc.
 > present, it will be tricky to define a property that applies to a
 > block and makes its lines align to other blocks.
 > Shouldn't property that aligns lines in columns/pages belong to an
 > element that contain all of the columns/pages?

Yes. I believe 'line-stacking-strategy' does this. I.e., you use it on
the containing block of the lines you want to impact:

   "This property determines the line stacking strategy for stacked
   line boxes within a containing block element."

 > 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 Friday, 2 January 2009 23:04:58 UTC

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