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

Remove implicit anchors, as they are not yet supported in the spec #272

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

jamesnw
Copy link
Contributor

@jamesnw jamesnw commented Nov 20, 2024

The anchor attribute has been removed from the standard pending conversation here- whatwg/html#9144. Alternatively, we could remove this feature until it is supported, but I'm not sure it's worth it.

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for anchor-position-wpt canceled.

Name Link
🔨 Latest commit b791155
🔍 Latest deploy log https://app.netlify.com/sites/anchor-position-wpt/deploys/673e532a8d67760009802f83

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for anchor-polyfill ready!

Name Link
🔨 Latest commit b791155
🔍 Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/673e532a77fac100085015d5
😎 Deploy Preview https://deploy-preview-272--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.

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving because this is better than no note, but my leaning would be to remove support for the anchor attribute if it looks like it won't eventually land. I don't want to encourage people to use features that have a low percent chance of being implemented natively. @mirisuzanne What do you think?

@jgerigmeyer
Copy link
Member

jgerigmeyer commented Nov 20, 2024

@jamesnw Related to this, it looks like the spec has removed anchor(implicit), and added position-anchor: auto -- https://drafts.csswg.org/css-anchor-position/#changes

@mirisuzanne
Copy link
Member

I'm approving because this is better than no note, but my leaning would be to remove support for the anchor attribute if it looks like it won't eventually land. I don't want to encourage people to use features that have a low percent chance of being implemented natively.

I agree with @jgerigmeyer

@jamesnw jamesnw changed the title Add note about implicit support Remove implicit anchors, as they are not yet supported in the spec Nov 20, 2024
* main:
  Update links and add description to readme.
  Adjust examples
  Fix tests
  remove reference to open-props
  lint
  lint
  spacing
  apply OddBird brand tokens to demo site
Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesnw Feel free to merge if my changes in b076add look okay.

// Store anchor name
anchorName = name.name;
}
if (isIdentifier(name) && name.name.startsWith('--')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hesitant to combine these ifs, as it subtly changes the logic, but it ends up not making a difference, so it makes sense to combine.

@jgerigmeyer jgerigmeyer merged commit a368c50 into main Nov 20, 2024
14 checks passed
@jgerigmeyer jgerigmeyer deleted the implicit-note branch November 20, 2024 21:31
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.

3 participants