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

RE: [css3-linebox] aligning lines

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Sat, 3 Jan 2009 15:18:54 -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: <7C2F64B551D8664AAD94A28DAC37D0206B533346E4@NA-EXMSG-C103.redmond.corp.microsoft.com>

Yes, I like where #2 and #3 are heading.

In fact, if we just wanted to had a line grid, the most simple way to define it would be a non-inheritable property of type <length>.

	.chapter { line-grid:14px; }
	.footnote { line-grid:12px; }

if both grid type and grid container are specified with one property, what can be more simple?

I sounds like we are making it more complicated because we still want to use other values of 'line-stacking-strategy' (e.g. max-height) which should override grid alignment on child elements.

Would this combination get all we need?

	1) inheritable property 'line-stacking-strategy' 
	   (values as currently listed, including 'grid-height')
	2) non-inheritable property 'line-grid-height' of type <length>.

	If 'line-stacking-strategy' is set to 'grid-height', lines are 
	aligned to the grid defined by nearest parent element with 
	'line-grid-height' set to a value. 

	If 'line-grid-height' is not set anywhere, 'grid-height' alignment
	is ignored (alternatively, it could align to root element or body lines)

Would this work? I realize this adds another property that could be avoided in other options, but wouldn't it make it simpler?

BTW, separating line-grid-height from line-height has a benefit of not actually having to set an explicit 'line-height' which has weird effect on lines with mixed fonts, vertical alignment etc. which is not necessarily desired whenever grid alignment is applied...

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

2) We change 'line-stacking-strategy' from inherited to non-inherited.
Then we can more safely look for the *youngest* ancestor with
'line-stacking-strategy: grid'. This would allow us to have more than
one grid per flow. This is a bug or a feature, depending on your point
of view.

3) We use 'grid-rows' [1] (or another non-inherited property) to define a
set of horizontal grid lines. E.g.:

  body {
    grid-rows: 12px;
    line-height: 12px;

  p {
    line-height: 14px;

This solution gives us independence from 'line-height'. This may be your
favored approach?

[1] http://dev.w3.org/csswg/css3-grid/#grid-rows

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

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