- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 25 Nov 2013 07:32:26 -0500
- To: Ian Hickson <ian@hixie.ch>
- Cc: whatwg@lists.whatwg.org
On 11/25/13 12:59 AM, Ian Hickson wrote: > It's more like <svg:g>. The CSS model just doesn't apply. Even in Firefox, > it's not really CSS that's working there. It's some weird proprietary > variant. It's really not, once you have a DOM and are inside <option>. > I mean, as you've pointed out, child nodes of the <select> that > aren't <option> or <optgroup> are mysteriously hidden That's <select>, not <option>. > but also, the <option> elements obey some values of 'display' but don't obey e.g. > 'position' or 'float'; That's pure CSS: it's a !important rule in a UA stylesheet. I guess you could claim that supporting !important in a UA stylesheet is a proprietary extension, albeit one that's in the process of being specified. > 'white-space' doesn't seem to work right in a <select> or <option>; option { white-space: nowrap !important; } in UA stylesheet. > the height of the <select> seems to be based in some > weird way on the height of some of the <option>s... That's about <select>, not <option>. > in the drop-down mode, it's even worse My comments were specifically about <option> in a listbox. A combobox is a different and more complicated story (though even there the layout of the <option> itself is pure CSS in Gecko). Put another way, there is no custom layout code for <option> in Gecko. It's all done entirely by the CSS renderer, based on the computed values of CSS properties for the element. Some of those computed values come from !important rules in a UA stylesheet, but that's it. > (By the way, in testing this, I discovered <option label> isn't supported > in Firefox. That's correct. https://bugzilla.mozilla.org/show_bug.cgi?id=40545 > HTH. Also ::first-line on a display:table-row doesn't seem to be work, > though I couldn't tell if that was per-spec or not. It doesn't seem to > work for regular <div>s either.) ::first-line on a display:table-row shouldn't work in Gecko right now, yes. Whether it's per-spec depends on which spec you're reading and the phase of the moon. ;) It should work on a block, of course, and does in my testing. -Boris
Received on Monday, 25 November 2013 12:32:56 UTC