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

Re: Baseline of inline-block elements

From: Myles C. Maxfield <mmaxfield@apple.com>
Date: Fri, 20 Mar 2015 10:34:31 -0700
Cc: www-style list <www-style@w3.org>, Simon Fraser <simon.fraser@apple.com>, Dave Hyatt <hyatt@apple.com>
Message-id: <E3650DBC-16FE-4F86-AD49-5FD4F771F874@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Alright, here’s some new language:

"The baseline of an 'inline-block’ whose ‘overflow’ property has a computed value of ‘visible’ is the baseline of its last line box in the normal flow, unless it has no in-flow line boxes, in which case the baseline is the bottom margin edge. The baseline of an inline-block whose ‘overflow’ property has a computed value not equal to ‘visible’ is the higher of either its bottom margin edge or the baseline of its last line box in the normal flow at the block’s initial scroll position, unless it has no in-flow line boxes, in which case its baseline is the baseline is the bottom margin edge.”

> On Mar 19, 2015, at 10:10 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Wed, Mar 18, 2015 at 9:46 PM, Myles C. Maxfield <mmaxfield@apple.com> wrote:
>> Therefore, we propose changing the language of this rule to:
>> "The baseline of an 'inline-block’ whose ‘overflow’ property has a computed value of ‘visible’ is the baseline of its last line box in the normal flow, unless it has no in-flow line boxes, in which case the baseline is the bottom margin edge. The baseline of an inline-block whose ‘overflow’ property has a computed value not equal to ‘visible’ is the higher of either its bottom margin edge or the baseline of its last line box in the normal flow, unless it has no in-flow line boxes, in which case its baseline is the baseline is the bottom margin edge.”
>> 
>> Changing this line in the spec would allow for two cases presented above to be laid out the same way.
>> 
>> This is the behavior that WebKit has historically implemented.
>> 
>> I have created a demonstration showing the four relevant cases at http://jsfiddle.net/tujsd3hu/2/.
> 
> I did not realize that WebKit differed on this aspect.  I suppose I'm
> fine with it, especially since Boris is. ^_^
> 
> (And yeah, need to specify "initial scroll position" for the
> overflowing case, but that's it.)
> 
> ~TJ
> 
Received on Friday, 20 March 2015 17:35:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC