CSS sibling-index() & sibling-count() enable dynamic styling based on element order
CSS now ships sibling-index() and sibling-count() functions that return an element’s position among its siblings and the total sibling count. This lets you craft pure‑CSS effects—e.g., borders that grow per sibling or opacity that scales with sibling count—without JavaScript, though support is currently limited to Chrome.