W3C home > Mailing lists > Public > www-style@w3.org > March 2011

[Selectors4] Semantic pseudo-classes (was: "Headings" selector?)

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Sat, 5 Mar 2011 18:30:43 +0100
Message-Id: <550A81EF-B062-40C9-87E2-2C5CC3ED54D0@crissov.de>
To: www-style list <www-style@w3.org>
I found this rotting in my drafts folder.

Boris Zbarsky (2010-10-06):
> 
> Now what one _could_ do is introduce a :header pseudo-class or something, if it's felt that it would be sufficiently useful….

We have or might have soon these pseduo-classes, some of which are arguably semantic (e.g. ‘:link’) and require special knowledge about the markup language:

  link
    :link, :visited
  target
    :target
  user action
    :focus, :hover
  language
    :lang()
  structural
    contextual reference
      :root
      :scope
    sibling
      :first-child
      :nth-child(N)
      :nth-last-child(N)
      :last-child
      :only-child
    typed sibling
      :first-of-type
      :nth-of-type(N)
      :nth-last-of-type(N)
      :last-of-type
      :only-of-type
    contents
      :empty
  UI element state
    :enabled, :disabled
    :checked
    :indeterminate
  UI state
    :active	
    :default
    :valid, :invalid
    :in-range, :out-of-range
    :required, :optional
    :read-only, :read-write
  negation
    :not(S)
[   :contains(S)   ]
  page
    :left, :right, :first
    :blank

We might want to have any of these (and more):

  table
    :cell
    :col(N), :row(N), :slot(N,N)
  page
    :odd, :even, :last
    :title, :cover
    :front, :back
    :center, :center-left, :center-right
    :spread-left, :spread-right
  structure
    :image – 2D replaced elements, incl. video
    :stream – continuous media like audio and video
    :input – textual form widgets
    :interactive – all kinds of form widget elements
    :text – does not contain anything but a text node
  semantic block
    :heading, :paragraph, :list, …
  semantic phrase
    :emphasis, …

Also see <http://wiki.csswg.org/spec/selectors4>, e.g. for table cell selectors.
Received on Saturday, 5 March 2011 17:31:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT