Next revision | Previous revisionNext revisionBoth sides next revision |
spec:selectors [2012/08/17 09:44] – created tabatkins | spec:selectors [2012/08/17 10:17] – [Ideas to consider] Added :time pseudo to ideas. tabatkins |
---|
====== Selectors Level 4 ====== | ====== Brainstorming for Selectors Level 5 ====== |
* [[http://www.w3.org/TR/css3-selectors/|Selectors 3 PR]] | * [[http://www.w3.org/TR/css3-selectors/|Selectors 3 PR]] |
* [[http://dev.w3.org/csswg/selectors4/|Selectors 4 ED]] | * [[http://dev.w3.org/csswg/selectors4/|Selectors 4 ED]] |
==== Ideas considered in Editor’s Draft (ED) ==== | |
* [[ideas:current-url-selector|Current URL Selector (with directory levels)]] – '':local-link()'' | |
* IDREF combinators: ''[[http://lists.w3.org/Archives/Public/www-style/2000Jan/0152.html|/attr/]]'' syntax, [[http://lists.w3.org/Archives/Public/www-style/2005Oct/0173.html|'':friend(attribute, selector)'']] syntax — ''/attr/'' syntax chosen | |
* [[http://lists.w3.org/Archives/Public/www-style/2008Mar/0193.html|:rtl and :ltr pseudo-classes]] (based on source ''dir'' attributes) (or maybe '':dir(rtl|ltr)''?) – '':dir()'' chosen | |
* ability to [[http://www.w3.org/TR/2000/WD-css3-selectors-20001005/#subject-pseudo|choose subject in the selector]] ([[http://lists.w3.org/Archives/Public/www-style/2000Oct/0182.html|alternative syntax]]) ([[http://lists.w3.org/Archives/Public/www-style/2002May/0018.html|discussion of syntaxes]]) – ''$'' marker | |
* ''[[http://lists.w3.org/Archives/Public/www-style/2009Mar/0146.html|:nth-match(<selector>, <an+b>)]]'' | |
* ''[[http://lists.w3.org/Archives/Public/www-style/2003Apr/0146.html|:matches()]]'' pseudo-class ([[http://lists.w3.org/Archives/Public/www-style/2000Oct/0182.html|alternate]]) – '':matches()'' | |
* [[http://lists.w3.org/Archives/Public/www-style/2011Jul/0415.html|case sensitivity in substring attribute selectors]] – ''[attr=val i]'' notation | |
==== Ideas to consider ==== | ==== Ideas to consider ==== |
* [[http://wiki.csswg.org/spec/css4-ui#more-selectors|CSS4-UI more selectors]] (a potentially growing set of User Interface related selectors). | |
* pseudo-attribute selectors, e.g. to select cells that are in the second column of a table: ''%%[#column=2]%%'' – this example done with '':nth-column(2)'' | |
* [[http://lists.w3.org/Archives/Public/www-style/2011Apr/0817.html|numeric attribute selectors]], e.g. ''%%[height>2]%%'', ''%%[count<=5]%%'', ''%%[balance<0]%%'', ''%%[#row>1]%%'' | * [[http://lists.w3.org/Archives/Public/www-style/2011Apr/0817.html|numeric attribute selectors]], e.g. ''%%[height>2]%%'', ''%%[count<=5]%%'', ''%%[balance<0]%%'', ''%%[#row>1]%%'' |
* ''%%::quote-start%%'' and ''%%::quote-end%%'', to match characters with the Quotation_Mark property that are direct children of the element and that are immediately inside the start and end (respectively) of the element, ignoring White_Space characters. (This would help a lot with ''<q>'' in HTML5.) | * ''%%::quote-start%%'' and ''%%::quote-end%%'', to match characters with the Quotation_Mark property that are direct children of the element and that are immediately inside the start and end (respectively) of the element, ignoring White_Space characters. (This would help a lot with ''<q>'' in HTML5.) |
* [[http://lists.w3.org/Archives/Public/www-style/2011Apr/0603.html|empty input selector]] | * [[http://lists.w3.org/Archives/Public/www-style/2011Apr/0603.html|empty input selector]] |
* [[http://lists.w3.org/Archives/Public/www-style/2007Nov/0108.html|more of the user action pseudo-classes]] | * [[http://lists.w3.org/Archives/Public/www-style/2007Nov/0108.html|more of the user action pseudo-classes]] |
| * More time pseudo-classes: '':time([ before <time> | after <time> | <time> to <time> ])'' |
==== Ideas superseded by other features ==== | ==== Ideas superseded by other features ==== |
* relationship selectors, e.g.: | * relationship selectors, e.g.: |
* to select cells in a column: ''%%col.foo // td%%'' – done with ''td:column(col.foo)'' | * to select cells in a column: ''%%col.foo // td%%'' |
* to select labels applying to an input control: ''%%input // label%%'' – done without further knowledge of markup language, i.e. ''$label /for/ input, $label input'' | * to select labels applying to an input control: ''%%!label /for/ input%%'' |
* to select map elements associated with an image: ''%%img // map%%'' – opposite of ''input''–''label'' situation, ''img /usemap/ map'' | * to select map elements associated with an image: ''%%img /usemap/ map%%'' |
* to select arbitrary associated elements: ''%%x[href#] // y[id#]%%'' – always any ID in target, ''x /href/ y'' | * to select arbitrary associated elements: ''%%x /href/ y%%'' |
* [[http://lists.w3.org/Archives/Public/www-style/2010Sep/0339.html|only-child-parent]] Most use cases for the parent selector care only about the only child. This doesn't have the same perf implications as a general parent selector. – solved with '':matches()'' and ''$'' | * [[http://lists.w3.org/Archives/Public/www-style/2010Sep/0339.html|only-child-parent]] Most use cases for the parent selector care only about the only child. This doesn't have the same perf implications as a general parent selector. – solved with '':matches()'' and ''$'' |
* [[http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016544.html|dynamic values selector]] - already handled by ''::value'' pseudo-element in CSS3-UI. | * [[http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016544.html|dynamic values selector]] - already handled by ''::value'' pseudo-element in CSS3-UI. |
| |