Range: walk up the ancestor tree to find prev/next nodes when shrinking
build gallery-sm-range