- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Tue, 25 Jan 2005 17:26:23 -0800
- To: "L. David Baron" <dbaron@dbaron.org>
- CC: www-style@w3.org
Hi, David, L. David Baron wrote: >On Tuesday 2005-01-25 15:59 -0800, Andrew Fedoniouk wrote: > > >>For example: >><select> element (list box) is "focusable" element but its <options> are not. >>Being in focus, <select> has one current item (option) which is visually distinct from others. >> >> > >The selected option should probably match the :checked pseudo-class. A >SELECT is logically pretty much the same thing as a radio group. > > > As discussed month ago in this list :checked corresponds to selected state of an <option> E.g. for <SELECT multiple> it matches any <option selected>. In short, neither :selection nor :checked cannot be used for :current item. >>I mean it is lack of "containment" selectors like: >> >>P < DIV - any <div> which contains <p> >>* < DIV - non empty div >>OPTION:focus < SELECT - select having option in focus. >> >> > >These have been discussed extensively on this list and one proposal was >in early drafts of css3-selectors. Search for ":subject" (the one that >was in css3-selectors), ":has", and ":matches". > >The problem is that they're all difficult to implement effeciently in >the processing model used for CSS selectors (used via a function that >maps (element, selector) -> boolean). > > Proposed "8.3.2 Indirect adjacent combinator" [1] has the same computational complexity as ":has" or "<" - O(n). So, if we will allow to use first why not to allow use second? >(The two bits of your message that I quoted seem like two entirely >separate issues, although the middle of the message seemed to connect >them in a way that I didn't understand.) > > Imagine that <SELECT> is a container of focusable <OPTION>s like <FORM> with <INPUT>s. If SELECT/OTIONs will behave this way we don't need "current element" entity - current select element is the one with the focus. The problem is that sometimes <SELECT> in focus (or having focus inside) has different look - e.g. "activated" border or selected items in it render in different color, etc. So to be able to show "styled SELECT" I need either :current selector or :has/:match/'<'. I personally prefer the first option. Andrew Fedoniouk. http://terrainformatica.com [1] http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#adjacent-i-combinators
Received on Wednesday, 26 January 2005 01:26:44 UTC