Re: [css-inline] Baseline Alignment Properties

> On Feb 20, 2015, at 1:59 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> 
> I put in a rough draft of the dominant-baseline, alignment-baseline,
> and baseline-shift properties from SVG into CSS Inline:
>  http://dev.w3.org/csswg/css-inline/#line-height
> 
> Comments welcome.
> 
> ~fantasai

Can we have something that allows us to pick "which" baseline to use for alignment, if there are several in an inline-block? Perhaps as a separate shorthand property, or maybe as additional values of 'alignment-baseline'.

If it was a separate shorthand property, then maybe something like this:

name: 	'alignment-line'
value:	first | last | <number>
initial:	last

'first': 
	If there is more than one line in the inline box to choose from, use the first line.

'last':
	If there is more than one line in the inline box to choose from, use the last line. (I think this is what happens now when an element is 'display:inline-block')

<number>
	If there is more than one line in the inline box to choose from, use the <number>th line, where <number> is an integer of 1 or higher. (not sure this value is really needed)


If this was not a separate property, but rather additional values of 'alignment-baseline', then the description could start out as "same as 'baseline', except...".

This would be really useful when laying out forms in which there are same-width labels-as-inline-blocks (sometimes multi-line when in narrow viewports) on the left, and spans-as-inline-blocks (often multi-line) around fields and drop-downs and such on the right. And that would have a good fallback to 'vertical-align:top' if the browser doesn't support 'vertical-align:baseline 0 first' (or 'vertical-align: first-baseline 0' or whatever).
 

Received on Saturday, 21 February 2015 00:29:54 UTC