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

[css-anchor-position] Rename anchor-default to position-anchor #10004

Closed
tabatkins opened this issue Feb 26, 2024 · 2 comments
Closed

[css-anchor-position] Rename anchor-default to position-anchor #10004

tabatkins opened this issue Feb 26, 2024 · 2 comments

Comments

@tabatkins
Copy link
Member

As the spec has sprouted more properties, a nice naming division has developed - all the props applying to the positioned element start with position-*, while the ones applying to the anchor element start with anchor-*. The obvious exception to this scheme is anchor-default, which is set on the positioned element. The Apple exploration renamed anchor-default to position-anchor, which is a pretty reasonable name.

This also opens up the possibility of using position to shorthand the positioning scheme (position-type: static | relative | etc) and the default anchor (position-anchor: --foo), as the Apple exploration suggested.

@kizu
Copy link
Member

kizu commented Mar 13, 2024

Sounds good, maybe the only thing to think about: how will this play with the position-container (#9868), as both might potentially be dashed idents, and if we'd want to have both in the shorthand, how to differentiate between them?

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-anchor-position] Rename `anchor-default` to `position-anchor` , and agreed to the following:

  • RESOLVED: rename anchor-default to position-anchor
  • ACTION Tab: open a new issue about resetting of position shorthand
The full IRC log of that discussion <dbaron> TabAtkins: We've set up a dichotomy in names for properties: the things that apply to positioned element start with position-*, the things that apply to the anchor start with anchor-*. anchor-default is the exception.
<dbaron> TabAtkins: so for better consistency and easier author handling of the mental model, we want to shift its name. The name from the Apple proposal was position-anchor.
<fantasai> +1
<kizu> q+
<dbaron> TabAtkins: so proposal is to rename anchor-default to position-anchor and leave everything else the same
<astearns> ack kizu
<dbaron> kizu: as I mentioned in issue 30 mins ago, small issue is we have another proposal for position-container, which could potentially accept dashed ident. If both end up in shorthand for position there's a clash of 2 dashed idents. Otherwise seems like a good thing.
<astearns> ack fantasai
<dbaron> TabAtkins: we don't have a proposal for making a position shortand (yet), so I'm happy to leave that as a problem for future Tab to solve
<dbaron> fantasai: we should resolve whether or not the position property resets this
<dbaron> fantasai: that determines whether it could be in the shorthand in the future
<dbaron> fantasai: I think we should.
<dbaron> fantasai: In terms of shorthand syntax, we could use slashes to disambiguate, like we have in background shorthand.
<dbaron> TabAtkins: but position shorthand is a separate issue, we can resolve on the naming change first.
<dbaron> fantasai: I think we should decide whether it's reset by position.
<dbaron> TabAtkins: whether it's reset by the position shorthand won't changed based on what my call it.
<dbaron> fantasai: more or less natural based on name
<dbaron> TabAtkins: I'm trying to make incremental progress.
<dbaron> fantasai: then we definitely need a fololwup issue
<dbaron> Proposed resolution: rename anchor-default to position-anchor
<dbaron> RESOLVED: rename anchor-default to position-anchor
<dbaron> ACTION Tab: open a new issue about resetting of position shorthand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants