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] could anchor()'s side argument be optional? #10408

Open
kizu opened this issue Jun 9, 2024 · 0 comments
Open

[css-anchor-position] could anchor()'s side argument be optional? #10408

kizu opened this issue Jun 9, 2024 · 0 comments

Comments

@kizu
Copy link
Member

kizu commented Jun 9, 2024

After thinking about #10318 (optional anchor-size() arguments) and #10317 (reorderable arguments of anchor()) for a bit, I wonder if we could make the anchor()'s <anchor-side> argument optional as well?

In my experiments, one of the more common things I was doing was inset: anchor(inside). Would be great to have a shortcut like inset: anchor() for cases like this, as well as allow inset: anchor(--foo) with the implied inside as well.

When comparing inside and outside, for any shorthand (inset, inset-block, inset-inline), only the inside makes sense, as outside results in a nonsensical values when applied to those. While separate single-side inset properties could use outside as the default, I do not think it is more useful than the inside, and is not worth the potential confusion and implementation complexity compared to just always using inside.

The only issue I can think of is related to the fallback value: while anchor(--foo, 0px) will make sense, I don't think it is ok to allow doing something like anchor(,0px) if we'd want to omit both the name and side?

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

No branches or pull requests

1 participant