Skip to content

Commit 99da0cb

Browse files
authored
[css-anchor-position-1] Rename inset-area to position-area (#10592)
* Update Overview.bs * Rename inset-area-example.png to position-area-example.png
1 parent 704c501 commit 99da0cb

File tree

2 files changed

+54
-55
lines changed

2 files changed

+54
-55
lines changed

css-anchor-position-1/Overview.bs

+54-55
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This can be done with the following CSS:
9191
/* Align the tooltip's bottom to the top of the anchor;
9292
this also defaults to horizontally center-aligning
9393
the tooltip and the anchor (in horizontal writing modes). */
94-
inset-area: block-start;
94+
position-area: block-start;
9595

9696
/* Automatically swap if this overflows the window
9797
so the tooltip's top aligns to the anchor's bottom
@@ -263,7 +263,7 @@ This property has no effect on [=implicit anchor elements=].
263263
li .positioned {
264264
position: absolute;
265265
position-anchor: --list-item;
266-
inset-area: inline-start;
266+
position-area: inline-start;
267267
}
268268
</pre>
269269

@@ -489,29 +489,28 @@ Anchor-Based Positioning {#positioning}
489489
An [=absolutely-positioned=] element
490490
can position itself relative to one or more [=anchor elements=] on the page.
491491

492-
The 'inset-area' function offers a convenient grid-based concept
492+
The 'position-area' property offers a convenient grid-based concept
493493
for positioning relative to the [=default anchor element=];
494494
for more complex positioning or positioning relative to multiple elements,
495495
the ''anchor()'' function can be used in the [=inset properties=]
496496
to explicitly refer to edges of an [=anchor element=].
497497

498-
<!-- Big Text: inset-area
498+
<!-- Big Text: position-area
499+
500+
████ ███ █████ █████ █████ █████ ███ █ █ ███ ████ █████ ███
501+
█ █ █ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █ █
502+
████ █ █ █████ █ █ █ █ █ █ █ █ ███ █████ ████ ████ █████
503+
█ █ █ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █
504+
█ ███ █████ █████ █ █████ ███ █ █ █ █ █ █ █████ █ █
499505

500-
████ █ █▌ ███▌ █████▌ █████▌ ███▌ ████▌ █████▌ ███▌
501-
▐▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐█ ▐█ █▌ █▌ █▌ ▐█ ▐█
502-
▐▌ ██▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌
503-
▐▌ █▌▐█ █▌ ███▌ ████ █▌ ████▌ █▌ █▌ ████▌ ████ █▌ █▌
504-
▐▌ █▌ ██▌ █▌ █▌ █▌ █████▌ █▌▐█ █▌ █████▌
505-
▐▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐█ █▌ █▌ █▌
506-
████ █▌ ▐▌ ███▌ █████▌ █▌ █▌ █▌ █▌ █▌ █████▌ █▌ █▌
507506
-->
508507

509-
The 'inset-area' Property {#inset-area}
508+
The 'position-area' Property {#position-area}
510509
---------------------------------------
511510

512511
<pre class=propdef>
513-
Name: inset-area
514-
Value: none | <<inset-area>>
512+
Name: position-area
513+
Value: none | <<position-area>>
515514
Initial: none
516515
Inherited: no
517516
Applies to: positioned elements with a [=default anchor element=]
@@ -523,12 +522,12 @@ only need to worry about
523522
the edges of the positioned element's [=containing block=],
524523
and the edges of the [=default anchor element=].
525524
These lines can be thought of as defining a 3x3 grid;
526-
'inset-area' lets you easily set up the positioned element's [=inset properties=]
527-
by specifying what area of this [=inset-area grid=] you want the positioned element to be in.
525+
'position-area' lets you easily set up the positioned element's [=inset properties=]
526+
by specifying what area of this [=position-area grid=] you want the positioned element to be in.
528527
Its syntax is:
529528

530529
<pre class=prod>
531-
<dfn>&lt;inset-area></dfn> = [
530+
<dfn>&lt;position-area></dfn> = [
532531
[ left | center | right | span-left | span-right
533532
| x-start | x-end | span-x-start | span-x-end
534533
| x-self-start | x-self-end | span-x-self-start | span-x-self-end
@@ -556,26 +555,26 @@ Its syntax is:
556555
]
557556
</pre>
558557

559-
<dl dfn-for=inset-area dfn-type=value>
558+
<dl dfn-for=position-area dfn-type=value>
560559
: <dfn>none</dfn>
561560
:: The property has no effect.
562561

563-
: <dfn><<inset-area>></dfn>
562+
: <dfn><<position-area>></dfn>
564563
::
565564
If the element does not have a [=default anchor element=],
566565
or is not an [=absolutely-positioned=] element,
567566
this value has no effect.
568567

569568
Otherwise, it has the following effects:
570569

571-
* The property selects a region of the [=inset-area grid=],
570+
* The property selects a region of the [=position-area grid=],
572571
and makes that the element's [=containing block=].
573572
See [[#resolving-spans]] for details.
574573

575-
Note: This means that the [=inset properties=] specify offsets from the inset-area,
574+
Note: This means that the [=inset properties=] specify offsets from the position-area,
576575
and some property values,
577576
like ''max-height: 100%'',
578-
will be relative to the inset-area as well.
577+
will be relative to the position-area as well.
579578

580579
* The ''align-self/normal'' value for the [=self-alignment properties=]
581580
behaves as either ''align-self/start'', ''align-self/end'',
@@ -591,7 +590,7 @@ Its syntax is:
591590
</dl>
592591

593592
<div class=note>
594-
If the element overflows its 'inset-area' (and 'inset') -modified [=containing block=],
593+
If the element overflows its 'position-area' (and 'inset') -modified [=containing block=],
595594
but would still fit within its [=original containing block=],
596595
by default it will "shift" to stay within its [=original containing block=],
597596
even if that violates its normal alignment.
@@ -603,7 +602,7 @@ Its syntax is:
603602
even when their [=containing block=]
604603
ends up smaller than anticipated.
605604

606-
For example, an ''inset-area: bottom span-right'' value
605+
For example, an ''position-area: bottom span-right'' value
607606
lets the positioned element stretch
608607
from its anchors left edge
609608
to its containing block's right edge,
@@ -615,9 +614,9 @@ Its syntax is:
615614

616615

617616
<h4 id=resolving-spans>
618-
Resolving <<inset-area>>s</h4>
617+
Resolving <<position-area>>s</h4>
619618

620-
The <dfn export>inset-area grid</dfn> is a 3x3 grid,
619+
The <dfn export>position-area grid</dfn> is a 3x3 grid,
621620
composed of four grid lines in each axis.
622621
In order:
623622

@@ -630,11 +629,11 @@ In order:
630629
or the ''anchor-start()'' edge fo the [=default anchor element=]
631630
if that is more [=end=]-ward.
632631

633-
An <<inset-area>> selects a region of this grid
632+
An <<position-area>> selects a region of this grid
634633
by specifying the rows and columns the region occupies,
635634
with each of the two keywords specifying one of them:
636635

637-
<dl dfn-type=value dfn-for="inset-area, <inset-area>">
636+
<dl dfn-type=value dfn-for="position-area, <position-area>">
638637
: <dfn>start</dfn>, <dfn>end</dfn>, <dfn>self-start</dfn>, <dfn>self-end</dfn>
639638
: <dfn>top</dfn>, <dfn>bottom</dfn>, <dfn>left</dfn>, <dfn>right</dfn>
640639
: <dfn>y-start</dfn>, <dfn>y-end</dfn>, <dfn>y-self-start</dfn>, <dfn>y-self-end</dfn>
@@ -647,13 +646,13 @@ with each of the two keywords specifying one of them:
647646

648647
Like in ''anchor()'',
649648
the plain logical keywords
650-
(''inset-area/start'', ''inset-area/end'', etc)
649+
(''position-area/start'', ''position-area/end'', etc)
651650
refer to the writing mode of the element's [=containing block=].
652-
The ''inset-area/x-start''/etc determine their direction in the same way,
651+
The ''position-area/x-start''/etc determine their direction in the same way,
653652
but in the specified physical axis.
654653

655654
The "self" logical keywords
656-
(''inset-area/self-start'', ''inset-area/x-self-end'', etc)
655+
(''position-area/self-start'', ''position-area/x-self-end'', etc)
657656
are identical,
658657
but refer to the element's own writing mode.
659658

@@ -678,27 +677,27 @@ with each of the two keywords specifying one of them:
678677
</dl>
679678

680679
Some keywords are ambiguous about what axis they refer to:
681-
''inset-area/center'', ''inset-area/span-all'',
682-
and the ''inset-area/start''/etc keywords that don't specify the block or inline axis explicitly.
680+
''position-area/center'', ''position-area/span-all'',
681+
and the ''position-area/start''/etc keywords that don't specify the block or inline axis explicitly.
683682
If the other keyword is unambiguous about its axis,
684683
then the ambiguous keyword is referring to the opposite axis.
685684
(For example, in ''block-start center'',
686-
the ''inset-area/center'' keyword is referring to the inline axis.)
685+
the ''position-area/center'' keyword is referring to the inline axis.)
687686
If both keywords are ambiguous, however,
688687
then the first refers to the block axis of the element's [=containing block=],
689688
and the second to the inline axis.
690689
(For example, ''span-all start'' is equivalent to ''span-all inline-start''.)
691690

692691
If only a single keyword is given,
693-
it behaves as if the second keyword is ''inset-area/span-all''
692+
it behaves as if the second keyword is ''position-area/span-all''
694693
if the given keyword is unambigous about its axis;
695694
otherwise, it behaves as if the given keyword was repeated.
696-
(For example, ''inset-area/top'' is equivalent to ''top span-all'',
697-
but ''inset-area/center'' is equivalent to ''center center''.)
695+
(For example, ''position-area/top'' is equivalent to ''top span-all'',
696+
but ''position-area/center'' is equivalent to ''center center''.)
698697

699698
<hr>
700699

701-
The <<inset-area>> also implies a default [=self-alignment=],
700+
The <<position-area>> also implies a default [=self-alignment=],
702701
which will be used if the [=self-alignment property=] on the element
703702
is ''align-self/normal'':
704703

@@ -721,16 +720,16 @@ is ''align-self/normal'':
721720
(making the element's end side flush with the end side of the "start+center" region).
722721

723722
<figure>
724-
<img src="images/inset-area-example.png" width=400>
723+
<img src="images/position-area-example.png" width=400>
725724
<figcaption>
726-
An example of ''inset-area: span-x-start top'' positioning.
725+
An example of ''position-area: span-x-start top'' positioning.
727726
</figcaption>
728727
</figure>
729728
</div>
730729

731730
Note: When the [=default anchor element=]
732731
is partially or completely outside of the pre-modified [=containing block=],
733-
some of the [=inset-area grid's=] rows or columns can be zero-sized.
732+
some of the [=position-area grid's=] rows or columns can be zero-sized.
734733

735734

736735
<!-- Big Text: anchor()
@@ -959,7 +958,7 @@ or does not have a [=default anchor element=],
959958
this value behaves as ''<self-position>/center''
960959
and has no additional effect on how [=inset properties=] resolve.
961960

962-
Note: Similar to 'inset-area',
961+
Note: Similar to 'position-area',
963962
when using ''anchor-center'',
964963
if the anchor is too close to the edge of the element's
965964
[=original containing block=],
@@ -1387,7 +1386,7 @@ Giving Fallback Options: the 'position-try-fallbacks' property {#position-try-fa
13871386

13881387
<pre class=propdef>
13891388
Name: position-try-fallbacks
1390-
Value: none | [ [<<dashed-ident>> || <<try-tactic>>] | <<'inset-area'>> ]#
1389+
Value: none | [ [<<dashed-ident>> || <<try-tactic>>] | <<'position-area'>> ]#
13911390
Initial: none
13921391
Inherited: no
13931392
Applies to: [=absolutely-positioned=] elements
@@ -1473,10 +1472,10 @@ Values have the following meanings:
14731472

14741473
Otherwise, does nothing.
14751474

1476-
: <dfn><<'inset-area'>></dfn>
1475+
: <dfn><<'position-area'>></dfn>
14771476
::
14781477
Automatically creates a [=position option=]
1479-
composed solely of an 'inset-area' property
1478+
composed solely of an 'position-area' property
14801479
with the given value.
14811480
</dl>
14821481

@@ -1572,16 +1571,16 @@ Values have the following meanings:
15721571
as it's a <<baseline-position>>
15731572
rather than a <<self-position>>.
15741573
</div>
1575-
* For 'inset-area',
1574+
* For 'position-area',
15761575
change the value
1577-
so that the selected rows/columns of the [=inset-area grid=]
1576+
so that the selected rows/columns of the [=position-area grid=]
15781577
maintain the same relative relationship to the new direction
15791578
that they had to the old.
15801579

15811580
<div class=example>
15821581
For example, if "top" and "left" are being swapped,
1583-
then ''inset-area: left span-bottom''
1584-
will become ''inset-area: top span-right''.
1582+
then ''position-area: left span-bottom''
1583+
will become ''position-area: top span-right''.
15851584
</div>
15861585

15871586
5. Return |styles|.
@@ -1791,7 +1790,7 @@ the following [=properties=]:
17911790
* [=sizing properties=]
17921791
* [=self-alignment properties=]
17931792
* 'position-anchor'
1794-
* 'inset-area'
1793+
* 'position-area'
17951794

17961795
It is invalid to use ''!important'' on the properties in the <<declaration-list>>.
17971796
Doing so causes the property it is used on to become invalid,
@@ -1896,14 +1895,14 @@ even tho they depend on layout and [=used values=].
18961895
with any non-''top/auto'' [=inset property|inset=] values
18971896
shifted by the [=snapshotted scroll offset=].
18981897

1899-
If |el| has a non-''inset-area/none'' 'inset-area' value,
1898+
If |el| has a non-''position-area/none'' 'position-area' value,
19001899
then for the purpose of the preceding calculation,
19011900
shift the value of ''anchor(start)'' and ''anchor(end)''
1902-
in the [=inset-area grid=]
1901+
in the [=position-area grid=]
19031902
by the [=snapshotted scroll offset=] as well.
19041903

19051904
Note: In other words, ''top: anchor(bottom); bottom: auto;''
1906-
and ''inset-area: bottom;''
1905+
and ''position-area: bottom;''
19071906
should result in the same IMCB
19081907
for the purpose of these overflow calculations.
19091908

@@ -2259,8 +2258,8 @@ interface CSSPositionTryDescriptors : CSSStyleDeclaration {
22592258
attribute CSSOMString justify-self;
22602259
attribute CSSOMString positionAnchor;
22612260
attribute CSSOMString position-anchor;
2262-
attribute CSSOMString insetArea;
2263-
attribute CSSOMString inset-area;
2261+
attribute CSSOMString positionArea;
2262+
attribute CSSOMString position-area;
22642263
};
22652264
</xmp>
22662265

0 commit comments

Comments
 (0)