Intent to Prototype: CSS :lang pseudo class level 4

95 views
Skip to first unread message

Roger Zanoni

unread,
Jun 8, 2022, 11:33:30 AM6/8/22
to blin...@chromium.org

Contact emails

rza...@igalia.com

Explainer

https://github.com/rogerzanoni/docs/tree/main/lang-level-4

Specification

https://www.w3.org/TR/selectors-4/#the-lang-pseudo

Summary

The :lang CSS pseudo-class currently matches elements based on level 3 specs logic, which describes a prefix-matching rule to match language values. The level 4 spec changes this matching logic, supporting argument-list and language range matching (according to the specs of the extended filtering operation from RFC4647 - Matching of language tags - section 3.3.2, and the simple priority list matching described on section 2.3)



Blink component

Blink>CSS

Motivation



Initial public proposal



Search tags

csslangpseudo

TAG review

Just extends functionality of the existing :lang selector.

TAG review status

Not applicable

Risks



Interoperability and Compatibility

This change mostly extends :lang functionality and don't change existing behavior, except for adding implicit wildcard matching, which breaks one of the existing level 3 tests: https://wpt.fyi/results/css/selectors/i18n/css3-selectors-lang-005.html



Gecko: No signal (https://bugzilla.mozilla.org/show_bug.cgi?id=1121792)

WebKit: Shipped/Shipping (https://webkit.org/status/#feature-css-selector-:lang()-level-4)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No.



Debuggability

Automatically supported, same as other pseudo-elements.



Is this feature fully tested by web-platform-tests?

No

Flag name



Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1281157

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5071058079055872

This intent message was generated by Chrome Platform Status.

Reply all
Reply to author
Forward
0 new messages