[css-line-grid] Are named grids required?

Fantasai, Koji,

I've been thinking about how we might simplify the initial version of a
baseline grid feature while still allowing future extensions.

One thing that the current draft and your proposal both have are named
grids. I'm not certain named grids are required for the largest set of use
cases. In most cases I can think of, there is only a single grid. And when
you do need more than one grid, the use of each grid is usually
constrained to separate parts of the tree (elements in a single parent do
not snap to different grids).

What if we only allowed unnamed baseline grids to start, but left the
syntax open to allow for named grids in the future? The first iteration of
the line-grid property would only allow an element to establish a new
baseline grid:

line-grid: auto | new

where auto (or none?) is the initial value that doesn't establish a grid,
and new establishes a new baseline grid that all of the element's children
can use to snap to. Later on, if we find a need for named grids we could
extend the syntax to:

line-grid: auto | new [named <ident>]

The line-snap property would start out just snapping the dominant baseline
to whatever grid has been established for the element - the closest parent
with 'line-grid: new' or a default grid from the root element. When and if
named grids were added, then we could also add a keyword to the line-snap
property to pick a named grid instead (perhaps 'from <ident>'?)

Thanks,

Alan

Received on Wednesday, 26 February 2014 00:44:50 UTC