Re: [css-line-grid][css-books] (base)line grids

On 10/1/14, 11:05 AM, "Håkon Wium Lie" <howcome@opera.com> wrote:

>Also sprach Tab Atkins Jr.:
>
> > > There are, however, two predefined baseline grids in CSS Books:
>'root'
> > > and 'page'. 'root' is there so that all elements can refer to one
> > > common baseline grid, no matter what other ancestor elements have
> > > done. In this example, article and aside content would use the same
> > > baseline grid:
> > >
> > >   body { line-grid: create }
> > >   article { line-grid: root }  /* ignore what <body> did, engage the
>'root' baseline grid instead */
> > >   aside { line-grid: root }    /* ignore what <body> did, engage the
>'root' baseline grid instead */
> > >
> > > It seems like a good, if not super-important, use case -- it gives
>you
> > > some of the flexibility of named baseline grids without introducing
> > > arbitrary name spaces. How would you express this in CSS-line-grid?
> > 
> > I'm curious as to why you think it's sufficient to let elements refer
> > to the root line grid over their nearest line grid, as opposed to any
> > other line grid in their ancestor list.
>
>I don't know of a good use case for fetching line grids from any
>(ancestor) element. The use case for 'root' isn't super-strong either,
>but it allows elements to sync to a common base if their parents stray.

I think that once we establish a good use case for reaching out to an
ancestor’s grid, then we can introduce root/page and/or named grids. Until
then, I’d rather keep things simple. I expect the vast majority of
documents will establish only one grid. If actual usage shows something
different, we can solve the use case when it comes up.

>
> > >    @page introduction { margin: 10% }
> > >    @page chapter { margin: 6% }
> > >    body { line-grid: page }
> > >
> > > This seems quite important for printed documents and I suggest it is
> > > added to CSS-line-grid (it's mentioned in a note in the most recent
>WD).
> > 
> > How do you establish the line-grid here?  Is it established by the
> > first page?  Or by the root element?
>
>It's established on a per-page basis. So as long as the pages have the
>same size and orientation, they will have the same baselines. The font
>information is borrowed from the root element, but the baseline grid
>starts at the edges of the page box, not the page area.

Could we define line-grid to establish a grid at the page box when used in
an @page rule?

@page { line-grid: create }

Thanks,

Alan

Received on Wednesday, 1 October 2014 19:19:43 UTC