-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Description
If we're not careful, the line-height-step property and the line grid will interfere instead of complementing each other. (see also #939)
We need to figure out how line-height-step and line-snap interact. I can think of a few possiblilities
- When
line-snapis notnone,line-height-stepcomputes to 0 (or same thing at used value time?) - first adjust the height of the line box, distribute the extra space equally above and below, then shift the adjusted linebox down as necessary to snap to the grid
- first adjust the height of the line box, distribute the extra space equally above and below, then shift the "original" linebox down within the adjusted size as necessary to snap to the grid. If this is not enough and we need to shift the "original" linebox by more than the space distributed below, then:
3.1. distribute the extra space equally above and below and shift the adjusted linebox down as necessary to snap to the grid
3.2. place all the extra space above, and and shift the adjusted linebox down as necessary to snap to the grid
I am not exactly sure which of these makes more sense, nor whether the same thing is preferred for line-snap: baseline and line-snap: contain or not, or if we should do something else.
Either way, it seems to me that the fix can go into the css-line-grid spec, but maybe we need to add some anchoring terminology in the css-rhythm spec:
- "the natural line box": the line-box as per CSS21 §10.8 Line height calculations.
- "the adjusted line box": the line box after its height is adjusted by
line-height-step.