-
Notifications
You must be signed in to change notification settings - Fork 772
spec selectors4
Keith Cirkel edited this page Feb 13, 2026
·
1 revision
-
Current URL Selector (with directory levels) –
:local-link() - IDREF combinators:
[/attr/](http://lists.w3.org/Archives/Public/www-style/2000Jan/0152.html)syntax,:friend(attribute, selector)syntax —/attr/syntax chosen -
:rtl and :ltr pseudo-classes (based on source
dirattributes) (or maybe:dir(rtl|ltr)?) –:dir()chosen - ability to choose subject in the selector (alternative syntax) (discussion of syntaxes) –
$marker [:nth-match(<selector>, <an+b>)](http://lists.w3.org/Archives/Public/www-style/2009Mar/0146.html)-
[:matches()](http://lists.w3.org/Archives/Public/www-style/2003Apr/0146.html)pseudo-class (alternate) –:matches() -
case sensitivity in substring attribute selectors –
[attr=val i]notation
- 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) -
numeric attribute selectors, e.g.
[height>2],[count<=5],[balance<0],[#row>1] -
::quote-startand::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.) -
[:placeholder](https://developer.mozilla.org/en/CSS/%3a-moz-placeholder)- matches form elements displaying placeholder text. This allows web developers and theme designers to customize the appearance of placeholder text, which is a light grey color by default. This may not work well if you've changed the background color of your form fields to be a similar color, for example, so you can use this pseudo-class to change the placeholder text color. -
[::window](http://lists.w3.org/Archives/Public/www-style/2008Nov/0466.html)pseudo-element -
limited descendant combinator (more info) –
foo>bar, foo>:not(bar)>bar, …comes hardly close - Better definition of ::first-letter, see also note in Selectors L3
-
::first-words(n),::first-lines(n),::nth-line(an+b),::last-lineetc. -
semantic pseudo-class selectors e.g. for headings or "visible" elements (i.e. not <script> or <style>) akin to
:linketc. - Clarify that first formatted line is not triggered when preceded by a block http://wiki.csswg.org/spec/css2.1#issue-268
-
UA hint pseudo-element selectors
::typo,::matchetc. - empty input selector
- more of the user action pseudo-classes
- relationship selectors, e.g.:
- to select cells in a column:
col.foo // td– done withtd:column(col.foo) - 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 map elements associated with an image:
img // map– opposite ofinput–labelsituation,img /usemap/ map - to select arbitrary associated elements:
x[href#] // y[id#]– always any ID in target,x /href/ y
- to select cells in a column:
-
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$ -
dynamic values selector - already handled by
::valuepseudo-element in CSS3-UI.