W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: Baseline of <select> elements

From: Christian Biesinger <cbiesinger@google.com>
Date: Fri, 21 Nov 2014 18:51:45 -0500
Message-ID: <CAPTJ0XE6+goxA8RLDTe_zvY5nOiJvuK6BEGoCBvSxyqmXaGJfQ@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style list <www-style@w3.org>
On Thu, Nov 20, 2014 at 9:56 PM, L. David Baron <dbaron@dbaron.org> wrote:
> 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.

Hmm, good point. I think I'll solve my specific issue with a
!important rule in the UA stylesheet to disallow pages overriding
overflow for select.

(...at least for size=1. Behavior is different for size>1 and it seems
some pages, or at least some of our testcases, expect setting overflow
to work)

> 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.

Yes, a spec would be nice!

-christian
Received on Friday, 21 November 2014 23:52:12 UTC

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