[whatwg] Alignment of empty buttons

Boris Zbarsky bzbarsky at MIT.EDU
Thu Apr 25 12:17:03 PDT 2013


On 4/25/13 3:10 PM, Christian Biesinger wrote:
>  From the top of the content box? Maybe I'm using the term wrong - I
> mean the border-box minus borders and padding, which is a slightly
> different definition than you used above.

That's the content box, yes.

> Ah, I see. It's not entirely clear to me what ASK_FOR_BASELINE means
> and what ascent is initialized to when it's not set to that value

Basically in this case it means that the child (the anonymous block we 
put inside the button) said "I'm not computing my ascent unless I have 
to; please call GetBaseline() on me to find out what my ascent is".  If 
ascent is not set to ASK_FOR_BASELINE then it's already set to the 
ascent of the child.

> That said, what if there is no child?

In Gecko's implementation of buttons there is always an anonymous block 
child wrapping the button contents.

 > I guess this discussion doesn't really belong on
> this mailing list.

Well, the larger point of "button baselines need to be defined" kinda 
does, either here or on www-style...

-Boris




More information about the whatwg mailing list