Re: aligment-adjust property

At 11:57 PM 10/31/2005, Manuel Mall wrote:
>On Tue, 1 Nov 2005 02:36 pm, Steve Zilles wrote:
> >> At 02:30 AM 9/28/2005, Manuel Mall wrote:
> >>
> >> This is a request for clarification please.
> >>
> >> The alignment-adjust property has the values "before-edge" and
> >> "after-edge" as legal values. However, according to the definition of
> >> these baselines in section 7.13 (7.14 in the draft) they are only
> >> defined for line areas. The alignment-adjust property is defined only
> >> for formatting objects generating inline areas. Inline areas don't
> >> have those baselines and therefore I don't understand how such a
> >> value for alignment-adjust should be interpreted.
> >>
> >>
> > The text is correct as written. The alignment-adjust property is used
> > to establish the "alignment-baseline" for an area (see section
> > 7.13.1, "With the "alignment-adjust" property, the position of the
> > baseline identified by the "alignment-baseline" can be explicitly
> > determined"). Section 4.2.6 says, "each inline-area has an
> > alignment-baseline which specifies how the area is aligned to its
> > parent." In this case, the values in question specify that the
> > inline-area with the
> > "alignment-adjust" property is to be aligned either at the
> > before-edge or the after-edge of the line area of which it is a
> > descendant. It is perhaps confusing that the text in section 4.2.6
> > concerning the alignment-baseline makes a reference to aligning with
> > respect to its parent where, in this case, the alignment is with
> > respect to the line area from which the aligned area descends. Note
> > that the baseline referred to in the alignment-adjust property values
> > is not a baseline of the area being aligned, but is a baseline to
> > which it is aligned. Thus, it makes sense to reference baseline only
> > defined for line areas.
> >>
> >> Thank you
> >>
> >> Manuel
> >
>my interpretation is certainly different. You say: "Note
>that the baseline referred to in the alignment-adjust property values
>is not a baseline of the area being aligned, but is a baseline to
>which it is aligned." IMO the value referred to in the alignment-adjust
>property is not a baseline value as such but an instruction how to
>determine the alignment-point of the area to be aligned and it is not
>"the baseline to which it is aligned". For example for the value
>before-edge it says:
>     The alignment-point is at the intersection of the start-edge of the
>allocation-rectangle and the "before-edge" baseline of the area.
>The phrase '"before-edge" baseline of the area' clearly refers to the
>baseline of the area to be aligned. Any other interpretation doesn't
>make sense to me because alignment-adjust determines an alignment-point
>for the area in question. To give a XSL-FO example:
>alignment-adjust="central" ....></fo:block>
>Assuming everything else is default this means for the external-graphics
>area its alignment-point is in the central position on its start-edge
>and that point is then aligned with the alignment-baseline of the block
>which would be the alphabetic baseline for the font in question. As one
>can see the 'alignment-adjust="central"' does not refer to any
>baselines in the fo:block or any baselines the fo:external-graphic is
>aligned to (it is aligned to the alphabetic baseline of its parent) but
>to the intersection of the central baseline of the fo:external-graphic
>area with its start-edge.

You are correct, that at the time I wrote the first message (late at night) 
I was mentally equating "alignment-baseline" and "alignment-adjust". The 
confusion came from knowing what the effect of setting both of these value 
to "before-edge" was supposed to be. The message that you are commenting on 
almost got the intended behavior correct. It unfortunately, confused what 
was going on with "alignment-baseline" with what was going on with 
"alignment-adjust". The reason for this is that intended behavior of 
setting "alignment-baseline" to "before-edge" was that the "before-edge" of 
the area being aligned was aligned with the "before-edge" of the line-area.

The problem is not that the values of "before-edge" and "after-edge" should 
not be included as values of "alignment-adjust". The problem is that the 
text implies that these values are only meaningful for line-areas (which is 
true for the "alignment-baseline" property) and then fails to define what 
these values mean for "alignment-adjust".

These values are there to make it possible to treat the (CSS/XSL) 
"vertical-align" property as a shorthand. That is, to break up the behavior 
of the "vertical-align" property into a set of component properties that 
can be given values that mimic the behavior of the "vertical-align" values

The behavior of the "vertical-align" property is described in section 
10.8.1 Leading and half-leading of the CSS 2.1 specification
This text says,

    The following values align the element relative to
    the line box. Since the element may have children
    aligned relative to it (which in turn may have
    descendants aligned relative to them), these values
    use the bounds of the aligned subtree. The aligned
    subtree of an inline element contains that element
    and the aligned subtrees of all children inline
    elements whose computed 'vertical-align' value is
    not 'top' or 'bottom'. The top of the aligned subtree
    is the highest of the tops of the boxes in the subtree,
    and the bottom is analogous.

      Align the top of the aligned subtree with the top
      of the line box.

      Align the bottom of the aligned subtree with the
      bottom of the line box.

(As noted elsewhere in the XSL section, "top" and "bottom" apply only to a 
horizontal IPD and are mapped to "before-edge" and "after-edge", respectively.)

Thus, the definition that is missing from the XSL specification is the 
definition of the "before-edge" of the "aligned sub-tree" that is being 
aligned. With the addition of this definition, the values of "before-edge" 
and "after-edge" make sense and do the correct thing.

What had confused me was that setting "vertical-align" to "top" does two 
things: it sets the "alignment-baseline" to be the line-area before-edge 
AND it sets the "alignment-adjust" to also use the before-edge of the 
aligned subtree. It was this last point that XSL sub-group failed to 
correctly record in the break-out of the "vertical-align" property in 
section 7.29.22. "vertical-align" of the XSL Recommendation.

Received on Wednesday, 2 November 2005 20:11:50 UTC