Re: baseline-shift

On Wednesday 2010-04-28 07:52 +0100, Robert Longson wrote:
> Why did SVG define baseline-shift
> (http://www.w3.org/TR/SVG/text.html#BaselineShiftProperty) rather than
> using the existing vertical-align
> (http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align) CSS
> property?
> 
> Should SVG 2.0 deprecate baseline-shift and use vertical-align instead?

A little more history here, for a start:

'vertical-align' was in CSS1 and CSS2:
http://www.w3.org/TR/REC-CSS1-961217#vertical-align
http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align

XSL-FO turned 'vertical-align' into a shorthand for 4 properties
(alignment-baseline, alignment-adjust, baseline-shift, dominant-baseline):
http://www.w3.org/TR/2000/WD-xsl-20000301/#vertical-align
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#vertical-align

SVG 1.0 unified its plan for separate properties (which seems to
predate the first draft of the XSL split) to align with three of
those four properties (alignment-baseline and baseline-shift, and
dominant-baseline):
http://www.w3.org/TR/2001/REC-SVG-20010904/text.html

css3-linebox proposes applying the split that XSL-FO does to CSS as well:
http://www.w3.org/TR/2002/WD-css3-linebox-20020515/#baseline


I haven't looked into the details of how well these four definitions
(CSS 2.1, XSL-FO, SVG, and css3-linebox) align with each other.

I think the biggest compatibility issue without going into detail
appears to be whether these properties defined in SVG are
subproperties of a 'vertical-align' shorthand or whether they're
actually supposed to be separate.  I've proposed that we implement
'baseline-shift' in Gecko we implement it as a subproperty of a
vertical-align shorthand:
https://bugzilla.mozilla.org/show_bug.cgi?id=308338#c24

Doing this has the advantage of supporting both 'baseline-shift' and
'vertical-align', which would reduce the confusion for authors
familiar with CSS who are using SVG, and authors familiar with
existing SVG practices.

It's not clear to me how valuable the separation into subproperties
is, though.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Thursday, 29 April 2010 16:58:02 UTC