The "no-overflow" and "anchors-visible" values of position-visibility were straightforward to define. The "anchors-valid" value, tho, ended up with several important questions to answer that I'm not sure about.
-
What exactly is a "required anchor reference"?
top: anchor(--foo bottom); is clearly one.
- Is
top: anchor(--foo bottom, anchor(--bar bottom)); one (on --foo) or two (on --foo and --bar)? Or is it an "or" relationship - if either --foo or --bar is a valid reference, it works?
- When exactly is the default anchor element a required reference? We can't just rely on
anchor(bottom) references, as several other features reference the default anchor. Note that the initial value isn't "none", it's "implicit", so technically we're always attempting to reference a default anchor. Even if there isn't a single anchor(bottom) function on the element, the author could conceiveably be depending on the implicit anchor existing for its other effects.
- How does fallback affect this? In general,
position-visibility runs "after" fallback selection, so I presume we'd rely on the set of properties being used by the active fallback, and references in other fallbacks won't matter.
-
Do we want it to make the element invisible if any required references are invalid, or if all of them are? Is this something that needs to be controllable? (I'm inclined to say "any", since if you don't care about a given reference not resolving, you can always just give it a fallback value. Except for the default anchor...)
The "no-overflow" and "anchors-visible" values of
position-visibilitywere straightforward to define. The "anchors-valid" value, tho, ended up with several important questions to answer that I'm not sure about.What exactly is a "required anchor reference"?
top: anchor(--foo bottom);is clearly one.top: anchor(--foo bottom, anchor(--bar bottom));one (on --foo) or two (on --foo and --bar)? Or is it an "or" relationship - if either --foo or --bar is a valid reference, it works?anchor(bottom)references, as several other features reference the default anchor. Note that the initial value isn't "none", it's "implicit", so technically we're always attempting to reference a default anchor. Even if there isn't a singleanchor(bottom)function on the element, the author could conceiveably be depending on the implicit anchor existing for its other effects.position-visibilityruns "after" fallback selection, so I presume we'd rely on the set of properties being used by the active fallback, and references in other fallbacks won't matter.Do we want it to make the element invisible if any required references are invalid, or if all of them are? Is this something that needs to be controllable? (I'm inclined to say "any", since if you don't care about a given reference not resolving, you can always just give it a fallback value. Except for the default anchor...)