Skip to content

Commit

Permalink
[selectors-4] Defer to css-text for definition of content language so…
Browse files Browse the repository at this point in the history
… there's only one defining instance. Fixes #897.
  • Loading branch information
fantasai committed Jan 27, 2018
1 parent 46c51c4 commit 9eed0f9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions selectors-4/Overview.bs
Expand Up @@ -1849,9 +1849,10 @@ The Directionality Pseudo-class: '':dir()''</h3>
<h3 id="the-lang-pseudo">
The Language Pseudo-class: '':lang()''</h3>

If the document language specifies how the (human) content language of an
element is determined, it is possible to write selectors that
represent an element based on its language.
If the document language specifies how
the (human) <a>content language</a> of an element is determined,
it is possible to write selectors that
represent an element based on its <a>content language</a>.
The <dfn id='lang-pseudo'>:lang()</dfn> pseudo-class represents an element that
is in one of the languages listed in its argument. It accepts
a comma-separated list of one or more <a>language ranges</a> as its
Expand All @@ -1860,15 +1861,15 @@ The Language Pseudo-class: '':lang()''</h3>
(Language ranges containing asterisks, for example,
must be quoted as strings.)

The <dfn>language</dfn> of an element is defined by the document language.
For example, in HTML [[HTML401]], the <a>language</a> is determined by a
Note: The <a>content language</a> of an element is defined by the document language.
For example, in HTML [[HTML5]], the <a>language</a> is determined by a
combination of the <code>lang</code> attribute, information from
<a element>meta</a> elements, and possibly also the protocol (e.g.
from HTTP headers). XML languages can use the <code>xml:lang</code>
attribute to indicate language information for an element.
attribute to indicate language information for an element. [[XML10]]

The element's <a>language</a> matches a <a>language range</a> if
the element's <a>language</a> (normalized to BCP 47 syntax if necessary)
The element's <a>content language</a> matches a <a>language range</a> if
its <a>content language</a> (normalized to BCP 47 syntax if necessary)
matches the given <a>language range</a> in an <var>extended filtering</var>
operation per [[RFC4647]] <cite>Matching of Language Tags</cite> (section 3.3.2).
The matching is performed case-insensitively within the ASCII range.
Expand Down

0 comments on commit 9eed0f9

Please sign in to comment.