Contextual links, and where the pencil goes
The first teaser of the listing. Its trigger is pinned to the top of its region, in the same corner as the trigger of the views block around it.
The regions of a page that carry contextual links, and the trigger and list each one gets: a page title block, a menu block, a views block listing teasers whose rows are regions nested inside it, a content block beside a menu in a narrow column, and a footer menu whose list has no room below it. The regions are real `contextual-region` elements and contextual.js fetches their links as it does everywhere, but the links belong to groups of this module and all of them come back to this page -- nothing here belongs to an entity of the site. Contextual links are only shown to a user with the "Use contextual links" permission, so sign in as one to see them. Nothing is saved and the content is made up.
Contextual links are only printed for a user with the "Use contextual links" permission, and this account does not have it: the regions below are there, but none of them carries a trigger. Sign in as a user who has it to see the links.
The two blocks every page has, and the two shapes a region takes: a page title block, whose trigger sits at the end of a single line of heading and so over the end of a long title, and a menu block, a list of links whose trigger has to stay clear of the last item in a row. The menu carries the links of its block and an "Edit menu" link of the menu, in one list, the way core merges them.
Regions nested inside a region: the block is one, carrying the links of the block and the "Edit view" link of the view, and every teaser in it is another, carrying the links of its node. The first teaser trigger is pinned to the same corner as the block trigger, and hovering the teaser reveals both -- that is the collision the theme moves the block trigger aside for. The second teaser has a title long enough to run under its trigger, the third is unpublished and the fourth is sticky, so the region is checked against the backgrounds a teaser can carry.
A two column section: a content block in the wide column, whose list holds the links of the block and the "Edit" link of the content block, and a menu block in the narrow one. A list of links is wider than a narrow column can be, so the open list overhangs its region and has to stay above whatever is beside it.
The body of a content block placed in the block layout. Its region carries the links of the block it is placed in and the "Edit" link of the block content, merged into one list, the way BlockViewBuilder moves the contextual links of the content onto the block.
A footer menu, the last region of the example. Scroll until it sits at the bottom of the window and open its links: there is no room for the list below the trigger, so the theme stands it on top of the trigger instead. Below the toolbar the same rule runs the other way, so a list is never opened upwards under it.