- From: Aharon (Vladimir) Lanin <aharon@google.com>
- Date: Wed, 19 Jan 2011 18:37:31 +0200
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: W3C style mailing list <www-style@w3.org>
- Message-ID: <AANLkTinK7BMCNj=7KwhRPfyYe4SzDRh7r2UnnsbyVgnR@mail.gmail.com>
Got it. So, I guess my last paragraph has to be modified to the following: 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>? If it were match-parent, the default behavior would be for all options to line up to the select direction's start edge even when different options have different direction - but it could be controlled by setting it to a different value. 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. On Wed, Jan 19, 2011 at 6:18 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > On 1/19/11 11:11 AM, Aharon (Vladimir) Lanin wrote: > >> Well, it does seem to inherit from the <select>, but not from a parent >> of the select. >> > > Quoting from Gecko's UA stylesheet: > > select { > text-align: start; > } > > There are also similar rules there for input and textarea (buttons and > reset/button/submit inputs are set to text-align:center, though). > > You can see the whole forms-related bit of the stylesheet at > http://mxr.mozilla.org/mozilla-central/source/layout/style/forms.css if > needed. > > > That said, none of your testcases set text-align, and Gecko >> currently inherits the "start" value as "start", so in fact >> everything on a page has a computed text-align of "start" by >> default. Unless someone sets some text-align styles somewhere. >> >> >> I do not know what you mean. Here is the content of my attachment. Note >> the text-align on body and on several of the option elements. >> > > Er, I meant "set text-align on the select", and I meant to quote the above > UA rule but clearly forgot to. :( > > -Boris >
Received on Wednesday, 19 January 2011 16:38:21 UTC