Re: Baseline of <select> elements

On Thursday 2014-11-20 21:41 -0500, Christian Biesinger wrote:
> Now, a <select> element behaves a lot like an inline-block element, and UA
> default stylesheets make it one, though I guess it's technically a replaced
> element. Still, my question here is, what should be the baseline for a
> <select> that has a style of overflow: hidden as seen on
> http://panasonic.asia/in/airconditioner/EnergySavingCalculator.html (the
> select next to SELECT YOUR HOME TYPE)
> 
> Simplified testcase at http://jsbin.com/qosewufema/1/
> 
> IE and Firefox calculate the baseline ignoring the overflow: hidden. Blink
> currently notices the overflow: hidden and calculates the baseline as the
> bottom of the margin edge. Who is right?

If you consider select to be a replaced element, then
overflow:hidden should not make a difference for the baseline of
selects, since 'overflow' only applies to block containers, which
are defined at http://www.w3.org/TR/CSS21/visuren.html#block-boxes
as things that hold either blocks or inlines.

If you think you can model the inside of a select using CSS block
and inline layout, though, rather than considering it to be a
replaced element, then I guess there's an argument for it applying.
It doesn't really seem to make sense, though, since I'm not sure
what a select without overflow:hidden would be.

Though, really, we need a spec for form control layout.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 21 November 2014 02:56:58 UTC