W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: <option> and text-align

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Wed, 19 Jan 2011 19:01:20 +0200
Message-ID: <AANLkTi=mnOmWOAJqub-tCgHPnMqJ609yn5A58bTkKkjz@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: W3C style mailing list <www-style@w3.org>
> Possible.  I'm not sure how web-compatible dropping text-align styling
> on form controls might or might not be.  If my <select> is inside a
> centered <div>, it's not clear to me that I want all the stuff in the
> <select> centered, for example.  It's pretty clear to me that authors
> won't think about that, though.

You are right. So, I modify my proposal: HTML5 default stylesheet to specify
both text-align:start for <select> and text-align:match-parent for <option>.

> I think a stronger statement is that Gecko is alone in using the CSS
> formatting model to handle layout of the combobox dropdown and
> of the listbox (with block boxes for options, etc, etc).

Right. Should the CSS spec imply that this is a bug on Gecko, a bug on the
others, or say nothing at all, so we continue to have a free-for-all?

Aharon

On Wed, Jan 19, 2011 at 6:50 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 1/19/11 11:37 AM, Aharon (Vladimir) Lanin wrote:
>
>> Now, if you say that text-align can and should control the alignment of
>> an option, what should the default text-align value be for option?
>> Currently, the default value is "start" for the root element, and
>> inherited by all others. However, Gecko's UA default stylesheet
>> specifies "start" again for <select>. Perhaps, though, that should be
>> dropped, and the HTML5 default stylesheet should specify
>> text-align:match-parent for <option>?
>>
>
> Possible.  I'm not sure how web-compatible dropping text-align styling on
> form controls might or might not be.  If my <select> is inside a centered
> <div>, it's not clear to me that I want all the stuff in the <select>
> centered, for example.  It's pretty clear to me that authors won't think
> about that, though.
>
>
>  But the bigger question is whether the CSS spec can and should state
>> that text-align affects <option> - since currently Firefox is alone in
>> that regard.
>>
>
> I think a stronger statement is that Gecko is alone in using the CSS
> formatting model to handle layout of the combobox dropdown and of the
> listbox (with block boxes for options, etc, etc).
>
> From my testing, other UAs don't apply text-align inside a combobox
> dropdown, don't apply color styles, don't apply font-size or line-height or
> font-weight styling, etc, etc.  As in, as far as I can tell, they're just
> not using a CSS renderer to render that content.  Or they're rendering
> something totally different from the actual DOM (but note that styles from
> the <select> aren't inherited into the combobox dropdown either, at least in
> my testing).
>
> Inside a listbox, it looks like UAs will apply some things (like color) but
> not others (like pretty much anything else I've tried).  Again, it's not
> clear to me whether the CSS formatting model is being used at all there.
>
> -Boris
>
Received on Wednesday, 19 January 2011 17:02:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT