- From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
- Date: Mon, 15 May 2023 22:33:05 +0000
- To: public-css-archive@w3.org
xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-anchor-1] Change `anchor-scroll`'s initial value to `default` ==
I think it's better if `anchor-scroll`'s initial value is `default`, so that as long as we are using `anchor-default` or implicit anchor, we don't need to explicitly set the value of `anchor-scroll`.
This would allow a very simple the basic usage pattern:
```css
.anchor { anchor-name: --my-anchor; }
.target {
position: fixed;
anchor-default: --my-anchor;
top: anchor(bottom);
left: anchor(left);
}
```
Also:
- In my understanding, `anchor-scroll` is a technical side-product to prevent doing relayout on scroll changes
- We might change the name of `anchor-scroll` for issues like #8675
So it's not a very ergonomic design, and if we can avoid it from a use case, avoid it.
# Exact proposal
Change `anchor-scroll`'s syntax to: `default | none | <anchor-element>`
Change its initial value to `default`
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8844 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 15 May 2023 22:33:07 UTC