Skip to content

[css-anchor-position] Details on "anchors-valid" #10201

@tabatkins

Description

@tabatkins

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.

  1. 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.
  2. 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...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Thursday Afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions