← Back to release summary

Child-indexed pseudo-classes matching elements without a parent

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 57)
Intent stage
None

Summary

Change how the child-indexed pseudo-class selectors are matched so they also match elements without a parent. This is a change in the spec from selectors-3 to selectors-4. The reasoning for this is explained in the spec.

Standards & signals

Samples: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3Ehtml%20%7B%20color%3A%20red%3B%20%7D%20html%3Afirst-child%20%7B%20color%3A%20green%3B%20%7D%3C%2Fstyle%3E%0Afoo

View on chromestatus.com