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

Also sprach Alan Stearns:

 > > > > > How about a publication with two columns of text, e.g. main body
 > > > > > and sidebar on the outer edge of each page, where the sidebar has
 > > > > > smaller type...?
 > > > >
 > > > >Yes, this is a common case. So, your markup would be something like:
 > > > >
 > > > >  <article>
 > > > >     ...
 > > > >     <aside>...</aside>
 > > > >     ...
 > > > >     <aside>...</aside>
 > > > >     ...
 > > > >  </article>
 > > > >
 > > > >Setting a baseline grid on the 'article' element is a solution for the
 > > > >main column, but setting it on 'aside' would lead to each <aside>
 > > > >element having its own baseline grid.
 > > > >
 > > > >This is another situation where the 'root' keyword would be handy, one
 > > > >could simply do:
 > > > >
 > > > >  article { baseline-grid: new }
 > > > >  aside { baseline-grid: root }
 > > > 
 > > > This works or not depending on the designer’s intent. It definitely allows
 > > > the two aside elements to share a grid, but as far as I can tell this
 > > > isn’t usually what the designer wants. What I see instead are aside
 > > > elements with their own grid but where the first line of each aside aligns
 > > > with a baseline from the article text.
 > >
 > >Both are good use cases, I believe. Like you say, it's common to have
 > >(a) sidenotes "hanging" in the outside margin, in which case each sidenote
 > >can have its own baseline grid. But, it's also common for sidenotes to (b)
 > >stack tightly in a sidenote area, in which case you want all sidenotes
 > >to use the same baseline grid.

 > >I don't see a way of doing it in CSS-line-grid?
 > 
 > It all depends on how you’re positioning the asides. If you’re stacking
 > them up on top of each other and establishing a new grid for each aside,
 > you’d want to make sure your margins and padding for the asides use values
 > that work with the grids.

The challenge was, if you read the quote text above, to use the same
baseline grid.

 > Or the markup might have a container for all of
 > the asides, and that container could establish a single grid.

Changing the markup isn't really a solution, then you lose the
reference points of the sidenotes. In a paginated context you want
sidenotes to appear on the same page as their reference point.

Having a simple keyword ('root' or something similar) allows us to
address this common use case. 

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

Received on Friday, 3 October 2014 08:12:25 UTC