- From: Christoph Päper via GitHub <noreply@w3.org>
- Date: Sat, 31 Jan 2026 22:17:26 +0000
- To: public-css-archive@w3.org
As an author, I would expect that even simpler cases of equivalence like `[lang|=deu]:lang(ger)` just worked, although BCP47 of course favors `[lang|=de]:lang(de)` everywhere. Browsers instead support stuff like `[lang|=German]:lang(German)`. <!-- > The element’s [content language](https://www.w3.org/TR/css-text-4/#content-language) matches a [language range](https://drafts.csswg.org/selectors/#language-range) if its content language, as represented in BCP 47 syntax, matches the given language range in an _extended filtering_ operation per [[RFC4647]](https://www.rfc-editor.org/rfc/rfc4647) _Matching of Language Tags_ (section 3.3.2). Both the content language and the language range must be _canonicalized_ and converted to _extlang form_ as per section 4.5 of [[RFC5646]](https://www.rfc-editor.org/rfc/rfc5646) prior to the _extended filtering_ operation. The matching is performed case-insensitively within the ASCII range. > > The language range does not need to be a valid language code to perform this comparison. I just did some testing which quickly went beyond what is currently in [WPT](https://wpt.fyi/results/css/selectors/selectors-4?label=experimental&label=master&aligned). --> -- GitHub Notification of comment by Crissov Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4154#issuecomment-3829462809 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 31 January 2026 22:17:27 UTC