- From: Alan Stearns <stearns@adobe.com>
- Date: Wed, 19 Mar 2014 00:30:17 +0000
- To: "www-style@w3.org" <www-style@w3.org>
The current line-grid module has a fairly complex box-snap property. I’m assuming it can be simplified substantially for the first level of the module. The most basic cases are to take the block and snap the top or bottom to a grid line, or center the whole block within two grid lines. This can be done with: block-snap: before | after | center | none Where before would shift the block down if needed so that the top of the margin box snapped to the next grid line, after would snap the bottom of the margin box to the next grid line, and center would align the block between the next two grid lines that could contain the block. After that basic coverage, we could decide on what frills are necessary: 1. I think that aligning the first baseline of the block to a grid line would be useful. This could be a ‘baseline’ or ‘first-baseline’ value. It might also be useful to snap the last baseline, but I’m less certain about that. 2. Choosing which before or after edge (margin, border, padding, content) to snap would be good. This could be done now or later by adding the *-box keywords like shape-outside. 3. Choosing to snap *both* before and after (which might increase the size of the block) could be useful. This could be a ‘both’ value - I don’t think there’s a need to complicate the syntax to allow you to say ‘block-snap: before after’ - though that could allow you to do weird things like snap the top margin edge and the bottom content edge. I’d be happy enough with just the first three values to begin with, as long as we had an extension strategy in mind for the rest. Are there any other block-snapping frills people would like to see? Thanks, Alan
Received on Wednesday, 19 March 2014 00:31:03 UTC