MicrosoftEdge / MicrosoftEdge/MSEdgeExplainers

[CSS Anchored Positioning] Selecting the anchor origin (feedback/questions)

Open
#490 2 comments 0 reactions 2 assignees View on GitHub

@melanierichards is already working on this.

Since Jun 6, 2021.

CSS Anchored Positioning
Dominant language
HTML
Stars
1.4k
Forks
286
Avg merge
3d 1h
Merged PRs (30d)
8

Description

In the explainer, it seems like the only way to select the origin of the anchor is using the anchor attribute of a popup element, which would reference another element's ID. I find this to be a bit cumbersome, as it means the following:

  • anchored positioning is limited to the popup element
  • The document needs to manage IDs of all the elements that might have a popup anchored to them. In documents with a lot of tooltips and popup-like functionalities, this can get quite hairy.

I would propose to have an additional CSS property, perhaps anchor-origin like in one of the spec alternatives (or anchor-target?), which would take either an ID or a selector() function (like in Scroll Linked Animations. For popup, it would be automatically be linked to the popup's anchor attribute, but would be available for any fixed-position element, and would be what defines whether a fixed-position element is anchored to an element or to the viewport.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.