W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-inline] Baseline Alignment Properties

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 20 Feb 2015 16:29:21 -0800
Cc: www-style list <www-style@w3.org>, SVG WG <w3c-svg-wg@w3.org>
Message-Id: <94561ED3-8B6C-45F4-AEED-ADF5AA613A1F@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC