8000 [css-anchor-position-1][editorial] Mention Popover a few more times · w3c/csswg-drafts@81d15e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 81d15e9

Browse files
committed
[css-anchor-position-1][editorial] Mention Popover a few more times
1 parent 8ca3cdb commit 81d15e9

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

css-anchor-position-1/Overview.bs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,23 @@ to find the “best” one that avoids overlap/overflow.
110110
max-inline-size: 20em;
111111
}
112112
</pre>
113+
114+
Note that using the [[#the-popover-attribute|Popover API]]
115+
will automatically set 'position' and create the anchoring relationship
116+
without setting 'anchor-name' or 'position-anchor' value
117+
(by defining an [=implicit anchor=]),
118+
so those properties wouldn't need to be explicitly set again.
119+
So with the correct markup, this example can be simplified to:
120+
121+
<pre class=lang-css>
122+
.tooltip {
123+
/* Using the popover + popovertarget attributes sets 'position: fixed'
124+
and creates the necessary position-anchor relationship already. */
125+
position-area: block-start;
126+
position-try: flip-block;
127+
max-inline-size: 20em;
128+
}
129+
</pre>
113130
</div>
114131

115132
<h3 id="values">
@@ -2374,14 +2391,16 @@ both existing and upcoming,
23742391
allow establishing such connections explicitly,
23752392
so that non-visual user agents can also benefit.
23762393

2377-
For example, the Popover API in HTML
2394+
For example, the [[#the-popover-attribute|Popover API in HTML]]
23782395
automatically links the invoker button
23792396
to the popover element,
23802397
including automatically adjusting tabbing order;
23812398
it <em>also</em> establishes the invoker button
23822399
as the [=implicit anchor element=] for the popover,
23832400
making it easy to use Anchor Positioning as well.
23842401

2402+
Issue: Add a popover example.
2403+
23852404
In more general cases,
23862405
ARIA features such as
23872406
the <a href="https://w3c.github.io/aria/#aria-details"><code>aria-details</code></a>

0 commit comments

Comments
 (0)
0