Before this change, ::selection styles had to be re-declared at every nesting level to ensure consistent behaviour. If you defined a custom selection colour on :root, it would apply to direct text content but might not propagate to text inside nested elements like <strong>, <em>, or <code>.

This is a blockquote-style note. Before highlight inheritance, you often had to write ::selection, .note::selection { … } to keep the selection style consistent here.

The fix is elegant: instead of inheriting through the element tree (where a child element might reset the cascade), highlight pseudo-element styles now inherit through the highlight pseudo chain. This means a single :root::selection { background: … } is enough for the entire document.

This makes design-system theming of selection much cleaner. Change one CSS variable and the selection colour updates everywhere — in paragraphs, inside code blocks, inside callouts, anywhere on the page.