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-1] Nest Validity subsections #11023 #11026

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions css-anchor-position-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,28 @@ as if by an additional ''translate()'' transform.
which input is being referred to.
</div>

### Validity {#anchor-valid}

An ''anchor()'' function is a
<dfn lt="valid anchor function|invalid anchor function">valid anchor function</dfn>
only if all the following conditions are true:

* It's being used in an [=inset property=]
on an [=absolutely positioned box=].
* If its <<anchor-side>> specifies a physical keyword,
it's being used in an [=inset property=] in that axis.
(For example, ''anchor()/left'' can only be used in 'left', 'right',
or a logical [=inset property=] in the horizontal axis.)
* The result of determining the [=target anchor element=] is not nothing when
given the querying element as the element it's used on,
and the anchor specifier as
the <<anchor-name>> value specified in the function.

If any of these conditions are false,
the ''anchor()'' function resolves to its specified fallback value.
If no fallback value is specified,
it makes the declaration referencing it [=invalid at computed-value time=].


<!-- Big Text: a-center

Expand Down Expand Up @@ -1145,29 +1167,6 @@ we define:
so the two boxes are never scrolled relative to each other at all.
</details>

Validity {#anchor-valid}
--------

An ''anchor()'' function is a
<dfn lt="valid anchor function|invalid anchor function">valid anchor function</dfn>
only if all the following conditions are true:

* It's being used in an [=inset property=]
on an [=absolutely positioned box=].
* If its <<anchor-side>> specifies a physical keyword,
it's being used in an [=inset property=] in that axis.
(For example, ''anchor()/left'' can only be used in 'left', 'right',
or a logical [=inset property=] in the horizontal axis.)
* The result of determining the [=target anchor element=] is not nothing when
given the querying element as the element it's used on,
and the anchor specifier as
the <<anchor-name>> value specified in the function.

If any of these conditions are false,
the ''anchor()'' function resolves to its specified fallback value.
If no fallback value is specified,
it makes the declaration referencing it [=invalid at computed-value time=].


<!-- Big Text: visibility

Expand Down Expand Up @@ -1389,8 +1388,7 @@ to the <<length>> separating the relevant border edges
whichever is in the specified axis)
of the [=target anchor element=].

Validity {#anchor-size-valid}
--------
### Validity {#anchor-size-valid}

An ''anchor-size()'' function is a
<dfn lt="valid anchor-size function|invalid anchor-size function">valid anchor-size function</dfn>
Expand Down