oddbird / css-anchor-positioning

Polyfill for CSS Anchor Positioning
https://anchor-polyfill.netlify.app/
BSD 3-Clause "New" or "Revised" License
224 stars 5 forks source link

Update Limitations to match current spec #177

Closed jamesnw closed 1 month ago

jamesnw commented 2 months ago

Description

  1. Updates the Limitations section in README against the spec as of March. https://www.w3.org/TR/css-anchor-position-1
  2. Adds Status note to Demo, and deprecation notice on @position-fallback example.
netlify[bot] commented 2 months ago

Deploy Preview for anchor-polyfill ready!

Name Link
Latest commit edd5b5c87914fbe6990cd1bb63f83bf201ce5975
Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/6643cfaf6635a500082b11f2
Deploy Preview https://deploy-preview-177--anchor-polyfill.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for anchor-position-wpt canceled.

Name Link
Latest commit edd5b5c87914fbe6990cd1bb63f83bf201ce5975
Latest deploy log https://app.netlify.com/sites/anchor-position-wpt/deploys/6643cfafcd621c00084a13be
jamesnw commented 2 months ago

There were also some additions to the spec that may impact the polyfill logic in some way.

  1. New section on "anchor relevance".
  2. In creating an anchor, new specification that Pseudo elements have same implicit anchor as originating element unless otherwise specified.
  3. New requirements for acceptable anchor points:
    1. el is either an element, or a [pseudo-element (https://www.w3.org/TR/selectors-4/#pseudo-element) that acts like one.
    2. el is not in the skipped contents of another element.
  4. Anchor function validity- adds new requirement that there be a target element.

I also chose to mirror what the Container Query polyfill did, and specify that we will not polyfill the JS APIs.