Re: [csswg-drafts] [css-anchor-1] Need ability to say "don't render" when anchor is off-screen (#7758)

During the implementation of `anchors-valid` and `anchors-visible`, I found the following things may need clarification about validity/visibility of anchors:
1. Is an anchor valid or visible if
   - it has `display: none`,
   - it's under `content-visibility: hidden`, or
   - it's under `content-visibility: auto` and is currently not rendered.
Our current plan is to treat them as invalid because the anchor doesn't exist in the layout tree.

2. For validity of anchor references,
   - should we iterate all CSS properties to find invalid anchor references? For example, is `border-width: anchor(--a top)` an invalid anchor reference or should it be ignored?
   - should we check the validity of anchor references from unused `@position-try` styles?
   - should an anchor reference with missing default anchor (e.g. `width: anchor-size(width)` without a default anchor) be treated as invalid or be ignored?
   - should we check the validity of anchor references from `anchor-size()`?
Our current plan is to only check for validity and visibility for anchor references that are actually resolved, but not including those in unused `@position-try`s.



-- 
GitHub Notification of comment by wangxianzhu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7758#issuecomment-2025819783 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 28 March 2024 18:07:47 UTC