CSS WG Blog Updated Working Draft of Selectors Level 4

This is a page from the Cascading Style Sheets Working Group Blog. Some other places to find information are the “current work” page, the www-style mailing list, the Future of CSS syndicator, and the issue list on Github.

Do you want to know how the CSS WG works? Fantasai has written about:csswg, An Inside View of the CSS Working Group at W3C.

Updated Working Draft of Selectors Level 4

By fantasai November 23, 2018 (Permalink)
Categories: publications

The CSS Working Group has published an updated Working Draft of Selectors Level 4. Selectors are patterns that match against elements in a tree and are used as a core part of CSS and in DOM methods such as .querySelector(). This update adds, drops, and renames a number of selectors:

In addition, the specificity rules for :is() and :nth-child() were altered to use the most specific selector argument rather than the most specific selector that happened to match. See specificity rules in the spec and
and discussion leading up to this change in Issue 1027.

Changes since the February 2018 WD are all listed in the Changes section.

One major issue that’s open is redefining the way invalid selectors are handled within :is() and similar pseudo-classes to ignore unknown selectors rather than invalidating the entire style rule. See Issue 3264. Another series of open issues concerns the :visited pseudo-class and how to balance security concerns with usability requirements. Other remaining work is largely clarifications and better integration with the DOM and HTML specifications.

Please send feedback by either filing an issue in GitHub (preferable) or sending mail to the (archived) public mailing list www-style@w3.org with the spec code ([selectors-4]) and your comment topic in the subject line. (Alternatively, you can email one of the editors and ask them to forward your comment.)

« Previous article Next article »

[Photo: group photo of the CSS working group in Lyon, France] Contact: Bert Bos
Copyright © 2017 W3C®

Last updated 2018-11-23 19:51:33