In a list, inset past the avatar — the one most often got wrong
The rule starts at 64px, where the text starts. A full-width line here cuts the avatar column, and the eye reads two columns instead of one list.
In a menu, full width and announced — the one case where the line is the only boundary
This document
role="separator" here, role="presentation" above. The difference is whether the line is doing work a heading is not already doing.
The ladder — you reach for a line third, not first
More gap between groups than within them. Free, survives every zoom level, and settles it most of the time.
A different surface behind one group. Still no line, and it survives being photographed in greyscale.
Same tone, and the space would have to be so large the list stops reading as one list. Now a line earns itself.
Vertical, in a toolbar — separating two kinds of action
With a word in it — when the line is announcing an alternative
or