Skip to content

feat: Add CSS anchor positioning polyfill #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

kurtdoherty
Copy link
Contributor

@kurtdoherty kurtdoherty commented Jul 23, 2025

Context

  • We're about to refactor our Menu and Tooltip components, with a focus on enhancing their positioning capability.
  • CSS Anchor Positioning is not yet supported by all the major browsers (at time of writing, Safari 26 has preview support and Firefox has no support).
  • Without CSS anchor positioning, we would have to buy into a significant amount of complexity to implement an equally capable JavaScript positioning solution.
  • OddBird provide a CSS Anchor Positioning polyfill that allows CSS anchor positioning to be used on browsers that don't yet natively support it.

This PR

  • Implements a new helper, applyCSSAnchorPositioningPolyfill, that allows anchor positioning CSS to be polyfilled on browsers that don't support it.

note: this is currently intended for internal use only, so it not exported in any way from the library for consumers to leverage directly.

@rpt-uk-github
Copy link

rpt-uk-github commented Jul 23, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@kurtdoherty kurtdoherty marked this pull request as ready for review July 23, 2025 23:25
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 012dc821 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (012dc82) Report Missing Report Missing Report Missing
Head commit (e0a1284) 7770 7047 90.69%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#635) 18 18 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@kurtdoherty kurtdoherty merged commit 24213a0 into main Jul 23, 2025
6 checks passed
@kurtdoherty kurtdoherty deleted the feat-add-css-anchor-position-polyfill branch July 23, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants