4 ms·
This is because the CSS spec is consciously written so that you only never need to look forward when parsing the DOM. For the same reason there is no follow sib
by hjnilsson 8y ago
This is because the CSS spec is consciously written so that you only never need to look forward when parsing the DOM. For the same reason there is no follow sibling selector, only previous sibling (`~`)
This is a major performance factor, since it means all layout can be done in one pass. If the proposed selector were added. CSS layout would have unbounded complexity.