This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15576 - Selectors3 changes the restrictions on the :lang pseudo-class
Summary: Selectors3 changes the restrictions on the :lang pseudo-class
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-15 17:39 UTC by Anton P
Modified: 2012-12-04 00:53 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-01-15 17:39:30 UTC
Reported by Arron Eicholz

5.11.4 (The language pseudo-class: :lang) says:
  # The pseudo-class ':lang(C)' matches if the element is in language C. Whether
  # there is a match is based solely on the identifier C being either equal to,
  # or a hyphen-separated substring of, the element's language value, in the
  # same way as if performed by the '|=' operator. The matching of C against the
  # element's language value is performed case-insensitively for characters
  # within the ASCII range.
  #
  # C must not be empty.

Selectors3, 6.6.3 (The language pseudo-class :lang) [http://www.w3.org/TR/selectors/#lang-pseudo] says:
  # Whether an element is represented by a :lang() selector is based solely on
  # the element's language value (normalized to BCP 47 syntax if necessary)
  # being equal to the identifier C, or beginning with the identifier C
  # immediately followed by "-" (U+002D). The matching of C against the
  # element's language value is performed case-insensitively. [...]
  #
  # C must be a valid CSS identifier [CSS21] and must not be empty. (Otherwise,
  # the selector is invalid.) 

In particular, selectors3 introduces normalization, removes the (implied) restriction that characters outside the ASCII range are matched case-sensitively, and introduces the restrcition that C must be a valid CSS identifier.

Should CSS21 be changed to match selectors3?

Conversation begins: http://lists.w3.org/Archives/Public/www-style/2011Aug/0630.html

Bug description: http://lists.w3.org/Archives/Public/www-style/2011Aug/0666.html