Skip to content
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

[BUG] Media Queries are not applied to anchor-name #212

Closed
jamesnw opened this issue Jul 2, 2024 · 1 comment
Closed

[BUG] Media Queries are not applied to anchor-name #212

jamesnw opened this issue Jul 2, 2024 · 1 comment
Labels
bug Something isn't working needs-prioritization

Comments

@jamesnw
Copy link
Contributor

jamesnw commented Jul 2, 2024

Describe the bug
If a anchor-name is defined inside a media query, the context of the media query is stripped out. This means that you can't use the polyfill to dynamically select the anchor based on screen size or other media queries.

To Reproduce

  1. Go to https://codepen.io/jamessw/pen/XWwveBJ in a browser that requires the polyfill
  2. See that the target aligns with the anchor that is defined in a @media print block, even though the non-polyfilled declarations are not applied.

Expected behavior
Media Queries should be respected for the anchor-name

Browsers tested on
Safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-prioritization
Projects
None yet
Development

No branches or pull requests

2 participants