Re: [csswg-drafts] Poor description of :lang() psuedo class selector [css-3] [selectors-3]

I suspect part of the vagueness is because the CSS pseudoclass is designed to work with many different document types, which may have their own syntaxes for specifying the element language.

CSS uses BCP 47 in the `:lang()` selector. If a document type uses a different syntax, the user agent needs to convert it to  BCP 47 in order to test equality.

The allowed values for the [`lang` attribute in HTML](https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes) and the [`xml:lang` attribute in XML](https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-lang-tag) are defined in those specifications. HTML specifies BCP 47, XML references rfc 3066. I'm not an expert on the differences between those two, but I'm pretty sure "en_US" isn't valid for either.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3022#issuecomment-413676381 using your GitHub account

Received on Thursday, 16 August 2018 20:35:42 UTC