Re: [css-line-grid][css-books] one property or more?

Also sprach Alan Stearns:

 > >> body { baseline-grid: new }
 > >> img, figure, h1, h2, h3, h4, h5, h6, nav, etc. { baseline-grid: none }
 > >> 
 > >> And the opt-in version would be:
 > >> 
 > >> body { line-grid: create }
 > >> p { line-snap: baseline }
 >
 > >I guess this was intended to show, that opt-in would be less complex for
 > >authors, but there are of course more body text elements that usually
 > >should “aline” with ‘p’, e.g.:
 > >
 > >  p, dt, dd, li, blockquote, pre, … {line-snap: baseline;}
 > 
 > Yes, that’s correct. Perhaps you’d add a class to the elements that should
 > snap their lines (this would work for opt-out as well). I’m still in favor
 > of opt-in, given Dave’s evaluation that there would be fewer elements
 > using the grid than not. Do you want to argue for the opt-out scheme with
 > a single property?

The one-property solution described in CSS Books gives you both opt-in
and opt-out so there's not much reason to argue.

Opt-in:

   p, dt, dd, li, blockquote, pre { baseline-snap: root }

Opt-out:

   body { baseline-snap: new }
   h1, h2, img, figure { baseline-snap: clear }

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

Received on Thursday, 2 October 2014 19:34:18 UTC