Re: [css-gcpm][css-figures] float-offset & line rhythms

On 1/25/14, 3:35 PM, "Håkon Wium Lie" <howcome@opera.com> wrote:

>Also sprach Alan Stearns:
>
> > >  - one can easily set the same rhythm by setting the same font &
> > >    line-height properties. This would cover most use cases, I think.
> > 
> > If that were true, then there would be no need for baseline grids. It’s
> > only the cases this technique does not cover that require a shared
> > baseline grid.
>
>Maybe we talk past each other.
>
>My main use case for baseline rhythms is to align the content between
>columns. The columns are typically in the same element, so one only
>needs to set the baseline rhythm once. Like in:
>
>  article { font: 12pt/1.2 serif; line-rhythm: new; columns: 12em }
>
>This will ensure that body text picks up the rhythm after figures,
>sub-headings and other pesky intrusions.

We’re talking past each other a bit, because I would like to have a
baseline grid system that worked with aligning line boxes in separate
elements that may or may not have the same relationship with a common
parent. Put another way, I think that multicol line alignment is one of
the major use cases, but not the primary one.

>I also want to be able to use the exact same baselines, but I believe
>that setting the baseline rhythm on the root, or another common
>ancestor, is sufficient to achieve this.

This might be the case. It’s definitely on me or other people who want
named baseline grids to justify the additional complexity.

>
> > >If the two floats are next to each other along the baseline axis, you
> > >should be able to establish the same baseline rhythm for the two of
> > >them by setting the same font/line-height etc.
> > 
> > The simplest case where this does not work is where both floats have a
> > subhead with a slightly larger line-height than the regular paragraphs,
> > and the subheads end up with a different number of line breaks. Let’s
>say
> > the paragraphs’ line-height is 20px, and the subhead’s line-height is
> > 24px. The first float has a single-line subhead, so the bottom of the
>line
> > boxes end up at 24px, 44px, 64px, etc. The second float’s subhead
>breaks
> > into two lines, so the bottom of the line boxes end up at 24px, 48px,
>70px.
>
>That's not how it works in my head. Assuming this code:
>
>  #float1, #float2 {
>    font: 20px/1 sans-serif;
>    line-rhythm: new;
>  }
>  h2 { line-height: 24px; line-rhythm: none }
>
>both floats will establish the same baseline rhythm with a frequency
>of 20px. The existence of a subhead (H2) with one or two number of
>lines inside the float will not change the rhythm. So the bottom of
>the line boxes will be 20px, 40px, 60px etc in both elements.

Yes, I see how this works now. So if the tops of the floats align, you can
establish separate rhythms that happen to align. If the tops of the floats
do not align, then using a common ancestor might be as useful as picking
one or the other float to establish a common rhythm.

>
>I'm open for suggestions on how to better describe this in prose, in
>case it's unclear in the spec.

The CSSWG already has a line grid module. I think it would be better to
pursue this feature there than in your books spec - baseline grids aren’t
only for books.

Thanks,

Alan

Received on Sunday, 26 January 2014 00:03:30 UTC