How Blink invalidates styles when :has() in use?

Great post on style invalidation in Blink, written by Byungwoo who implemented :has() in Blink.

Style invalidation is a process of identifying and marking elements that require their style to be recalculated in response to a mutation in the DOM. The style engine traverses the DOM tree and designates the affected elements for recalculation.

Efficient handling of style invalidation is crucial as it directly impacts meeting the 60fps criterion, which is essential for smooth and responsive rendering.

The :has() pseudo-class complicates the issue by introducing additional complexities and enables a wider range of variations in selectors:

The post not only covers :has() invalidation, but also covers style invalidation in general and builds up from that.

How Blink invalidates styles when :has() in use? →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.