[[https://css4-selectors.com/selector/css4/validity-pseudo-class/|W3C Working Draft]], [[https://drafts.csswg.org/selectors/|editor's draft]]
New features in level 4: [[https://css4-selectors.com/selectors/|see full list]]
Browser support: [[https://caniuse.com/#feat=css-case-insensitive|case insensitive attribute selectors]] (decent, except IE), [[https://caniuse.com/#feat=css-matches-pseudo|matches]] (none in IE, platform-flagged in Chrome, the others support it although mostly with a vendor prefix), [[https://caniuse.com/#feat=css-not-sel-list|combining :not]] and [[https://caniuse.com/#feat=css-nth-child-of|:nth-child]] (mostly unsupported), [[https://css4-selectors.com/selectors/|see full list]] (note the charts are not always up to date)
Use cases:
* [[https://css4-selectors.com/selector/css4/attribute-case-sensitivity/|case-insensitive attribute selector]] is used by Parsoid (since the spec requires `http-equiv` to be case insensitive)
* seems useful and mostly supported: [[https://css4-selectors.com/selector/css4/focus-container-pseudo-class/|:focus-within]] (for pure CSS menus/tabs, intelligent highlighting on keyboard navigation...), [[https://css4-selectors.com/selector/css4/matches-any-pseudo-class/|:matches]] once Chrome unflags it (poor man's LESS nested syntax), [[https://css4-selectors.com/selector/css4/placeholder-pseudo-class/|placeholder]] (for pure-CSS non-confusing placeholder styling)
* somewhat supported but seems mildly useful at best: [[https://css4-selectors.com/selector/css4/optionality-pseudo-class/|optionality]], [[https://css4-selectors.com/selector/css4/indeterminate-value-pseudo-class/|indeterminate]], [[https://css4-selectors.com/selector/css4/validity-pseudo-class/|validity]], [[https://css4-selectors.com/selector/css4/range-pseudo-class/|range]], [[https://css4-selectors.com/selector/css4/default-option-pseudo-class/|default]]
* seems very useful but support is poor: [[https://css4-selectors.com/selector/css4/dir-pseudo-class/|:dir]] (for LTR support), [[https://css4-selectors.com/selector/css4/relational-pseudo-class/|:has]] (makes selectors a lot more powerful), [[https://css4-selectors.com/selector/css4/grid-structural-pseudo-class/|grid pseudo-classes]] and [[https://css4-selectors.com/selector/css4/column-combination/|column combination]] (for table column styling), [[https://css4-selectors.com/selector/css4/target-container-pseudo-class/|:target-within]] (for intelligent highlighting on anchor navigation)