Skip to content

[css-anchor-position-1] Rename position-try-options to -fallbacks #10517

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

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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
26 changes: 13 additions & 13 deletions css-anchor-position-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ might result in the positioned element overflowing its [=containing block=]
or being positioned partially off screen.

To ameliorate this, an [=absolutely positioned=] element
can use the 'position-try-options' property
can use the 'position-try-fallbacks' property
to refer to several variant sets of positioning/alignment properties
(generated from the element's existing styles,
or specified in ''@position-try'' rules)
Expand All @@ -1375,11 +1375,11 @@ to additional be sorted by the available space they define,
if it's more important for the element to have as much space as possible
rather than strictly follow some declared order.

Giving Fallback Options: the 'position-try-options' property {#position-try-options}
Giving Fallback Options: the 'position-try-fallbacks' property {#position-try-fallbacks}
--------------------------------

<pre class=propdef>
Name: position-try-options
Name: position-try-fallbacks
Value: none | [ [<<dashed-ident>> || <<try-tactic>>] | <<'inset-area'>> ]#
Initial: none
Inherited: no
Expand All @@ -1399,7 +1399,7 @@ or a <<try-tactic>> representing an automatic transformation of the element's ex

Values have the following meanings:

<dl dfn-type=value dfn-for=position-try-options>
<dl dfn-type=value dfn-for=position-try-fallbacks>
: <dfn>none</dfn>
::
The property has no effect;
Expand Down Expand Up @@ -1614,7 +1614,7 @@ the [=position options list=] will be tried.
: <dfn>normal</dfn>
::
Try the [=position options=]
in the order specified by 'position-try-options'.
in the order specified by 'position-try-fallbacks'.

: <dfn>most-width</dfn>
: <dfn>most-height</dfn>
Expand Down Expand Up @@ -1646,7 +1646,7 @@ the [=position options list=] will be tried.
top: anchor(bottom);
left: anchor(left);
align-self: start;
position-try-options: --bottom-scrollable, flip-block, --top-scrollable;
position-try-fallbacks: --bottom-scrollable, flip-block, --top-scrollable;
position-try-order: most-height;
}
@position-try --bottom-scrollable {
Expand Down Expand Up @@ -1734,10 +1734,10 @@ The 'position-try' Shorthand {#position-try-prop}

<pre class="propdef shorthand">
Name: position-try
Value: <<'position-try-order'>>? <<'position-try-options'>>
Value: <<'position-try-order'>>? <<'position-try-fallbacks'>>
</pre>

This shorthand sets both 'position-try-options' and 'position-try-order'.
This shorthand sets both 'position-try-fallbacks' and 'position-try-order'.
If <<'position-try-order'>> is omitted,
it's set to the property's initial value.

Expand All @@ -1761,7 +1761,7 @@ defines a <dfn>position option</dfn>
with a given name,
specifying one or more sets of positioning properties
that will be applied to an element
via 'position-try-options',
via 'position-try-fallbacks',

The syntax of the ''@position-try'' rule is:

Expand Down Expand Up @@ -1825,7 +1825,7 @@ Note: The most common types of fallback positioning
(putting the positioned element on one side of the anchor normally,
but flipping to the opposite side if needed)
can be done automatically
with keywords in 'position-try-options',
with keywords in 'position-try-fallbacks',
without using ''@position-try'' at all.


Expand Down Expand Up @@ -1958,8 +1958,8 @@ laying out later elements cannot change this decision.
remove its [=last successful position option=]:

* |el| is not an [=absolutely positioned=] element
* |el|'s computed value for 'position-try-options' has changed
* Any of the ''@position-try'' rules referenced by |el|'s 'position-try-options'
* |el|'s computed value for 'position-try-fallbacks' has changed
* Any of the ''@position-try'' rules referenced by |el|'s 'position-try-fallbacks'
have been added, removed, or mutated.

Then, [=determine the position fallback styles=] of |el|
Expand Down Expand Up @@ -1989,7 +1989,7 @@ This limit must be <em>at least</em> five.
position: fixed;
top: anchor(--button bottom);
left: anchor(--button left);
position-try-options: flip-inline, flip-block, flip-block flip-inline;
position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;

/* The popover is at least as wide as the button */
min-width: anchor-size(--button width);
Expand Down