Results for “ancestor”
Small, practical examples. Search by task or narrow things down below.
Collect matching ancestors
jQuery: parents can return several ancestors, ordered from the nearest outward.
jQuery✓ Tested
Find the nearest matching ancestor
Read a parent row attribute using jQuery closest.
jQuery✓ Tested
Test whether one revision is an ancestor of another
Git: merge-base --is-ancestor reports its answer through the exit status.
Git✓ Tested
Adapt a component to its own container width
CSS: Container queries respond to a selected ancestor rather than the full viewport.
CSS✓ Tested
Keep a control fixed to the viewport during scrolling
CSS: Fixed positioning normally uses the viewport when no ancestor establishes a different fixed containing block.
CSS✓ Tested
List paths changed on a feature branch since its merge base
Git: A three-dot diff compares the branch tip with the common ancestor.
Git✓ Tested
Position a badge relative to its container
CSS: A positioned ancestor establishes the containing block for an absolutely positioned child.
CSS✓ Tested