@@ -91,7 +91,7 @@ This can be done with the following CSS:
91
91
/* Align the tooltip's bottom to the top of the anchor;
92
92
this also defaults to horizontally center-aligning
93
93
the tooltip and the anchor (in horizontal writing modes). */
94
- inset -area: block-start;
94
+ position -area: block-start;
95
95
96
96
/* Automatically swap if this overflows the window
97
97
so the tooltip's top aligns to the anchor's bottom
@@ -263,7 +263,7 @@ This property has no effect on [=implicit anchor elements=].
263
263
li .positioned {
264
264
position: absolute;
265
265
position-anchor: --list-item;
266
- inset -area: inline-start;
266
+ position -area: inline-start;
267
267
}
268
268
</pre>
269
269
@@ -489,29 +489,28 @@ Anchor-Based Positioning {#positioning}
489
489
An [=absolutely-positioned=] element
490
490
can position itself relative to one or more [=anchor elements=] on the page.
491
491
492
- The 'inset -area' function offers a convenient grid-based concept
492
+ The 'position -area' property offers a convenient grid-based concept
493
493
for positioning relative to the [=default anchor element=] ;
494
494
for more complex positioning or positioning relative to multiple elements,
495
495
the ''anchor()'' function can be used in the [=inset properties=]
496
496
to explicitly refer to edges of an [=anchor element=] .
497
497
498
- <!-- Big Text: inset-area
498
+ <!-- Big Text: position-area
499
+
500
+ ████ ███ █████ █████ █████ █████ ███ █ █ ███ ████ █████ ███
501
+ █ █ █ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █ █
502
+ ████ █ █ █████ █ █ █ █ █ █ █ █ ███ █████ ████ ████ █████
503
+ █ █ █ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █
504
+ █ ███ █████ █████ █ █████ ███ █ █ █ █ █ █ █████ █ █
499
505
500
- ████ █ █▌ ███▌ █████▌ █████▌ ███▌ ████▌ █████▌ ███▌
501
- ▐▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐█ ▐█ █▌ █▌ █▌ ▐█ ▐█
502
- ▐▌ ██▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌
503
- ▐▌ █▌▐█ █▌ ███▌ ████ █▌ ████▌ █▌ █▌ ████▌ ████ █▌ █▌
504
- ▐▌ █▌ ██▌ █▌ █▌ █▌ █████▌ █▌▐█ █▌ █████▌
505
- ▐▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ █▌ ▐█ █▌ █▌ █▌
506
- ████ █▌ ▐▌ ███▌ █████▌ █▌ █▌ █▌ █▌ █▌ █████▌ █▌ █▌
507
506
-->
508
507
509
- The 'inset -area' Property {#inset -area}
508
+ The 'position -area' Property {#position -area}
510
509
---------------------------------------
511
510
512
511
<pre class=propdef>
513
- Name : inset -area
514
- Value : none | <<inset -area>>
512
+ Name : position -area
513
+ Value : none | <<position -area>>
515
514
Initial : none
516
515
Inherited : no
517
516
Applies to : positioned elements with a [=default anchor element=]
@@ -523,12 +522,12 @@ only need to worry about
523
522
the edges of the positioned element's [=containing block=] ,
524
523
and the edges of the [=default anchor element=] .
525
524
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.
528
527
Its syntax is:
529
528
530
529
<pre class=prod>
531
- <dfn><inset -area></dfn> = [
530
+ <dfn><position -area></dfn> = [
532
531
[ left | center | right | span-left | span-right
533
532
| x-start | x-end | span-x-start | span-x-end
534
533
| x-self-start | x-self-end | span-x-self-start | span-x-self-end
@@ -556,26 +555,26 @@ Its syntax is:
556
555
]
557
556
</pre>
558
557
559
- <dl dfn-for=inset -area dfn-type=value>
558
+ <dl dfn-for=position -area dfn-type=value>
560
559
: <dfn>none</dfn>
561
560
:: The property has no effect.
562
561
563
- : <dfn><<inset -area>></dfn>
562
+ : <dfn><<position -area>></dfn>
564
563
::
565
564
If the element does not have a [=default anchor element=] ,
566
565
or is not an [=absolutely-positioned=] element,
567
566
this value has no effect.
568
567
569
568
Otherwise, it has the following effects:
570
569
571
- * The property selects a region of the [=inset -area grid=] ,
570
+ * The property selects a region of the [=position -area grid=] ,
572
571
and makes that the element's [=containing block=] .
573
572
See [[#resolving-spans]] for details.
574
573
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,
576
575
and some property values,
577
576
like ''max-height: 100%'' ,
578
- will be relative to the inset -area as well.
577
+ will be relative to the position -area as well.
579
578
580
579
* The ''align-self/normal'' value for the [=self-alignment properties=]
581
580
behaves as either ''align-self/start'' , ''align-self/end'' ,
@@ -591,7 +590,7 @@ Its syntax is:
591
590
</dl>
592
591
593
592
<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=] ,
595
594
but would still fit within its [=original containing block=] ,
596
595
by default it will "shift" to stay within its [=original containing block=] ,
597
596
even if that violates its normal alignment.
@@ -603,7 +602,7 @@ Its syntax is:
603
602
even when their [=containing block=]
604
603
ends up smaller than anticipated.
605
604
606
- For example, an ''inset -area: bottom span-right'' value
605
+ For example, an ''position -area: bottom span-right'' value
607
606
lets the positioned element stretch
608
607
from its anchors left edge
609
608
to its containing block's right edge,
@@ -615,9 +614,9 @@ Its syntax is:
615
614
616
615
617
616
<h4 id=resolving-spans>
618
- Resolving <<inset -area>>s</h4>
617
+ Resolving <<position -area>>s</h4>
619
618
620
- The <dfn export>inset -area grid</dfn> is a 3x3 grid,
619
+ The <dfn export>position -area grid</dfn> is a 3x3 grid,
621
620
composed of four grid lines in each axis.
622
621
In order:
623
622
@@ -630,11 +629,11 @@ In order:
630
629
or the ''anchor-start()'' edge fo the [=default anchor element=]
631
630
if that is more [=end=] -ward.
632
631
633
- An <<inset -area>> selects a region of this grid
632
+ An <<position -area>> selects a region of this grid
634
633
by specifying the rows and columns the region occupies,
635
634
with each of the two keywords specifying one of them:
636
635
637
- <dl dfn-type=value dfn-for="inset -area, <inset -area> ">
636
+ <dl dfn-type=value dfn-for="position -area, <position -area> ">
638
637
: <dfn>start</dfn> , <dfn>end</dfn> , <dfn>self-start</dfn> , <dfn>self-end</dfn>
639
638
: <dfn>top</dfn> , <dfn>bottom</dfn> , <dfn>left</dfn> , <dfn>right</dfn>
640
639
: <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:
647
646
648
647
Like in ''anchor()'' ,
649
648
the plain logical keywords
650
- (''inset -area/start'' , ''inset -area/end'' , etc)
649
+ (''position -area/start'' , ''position -area/end'' , etc)
651
650
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,
653
652
but in the specified physical axis.
654
653
655
654
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)
657
656
are identical,
658
657
but refer to the element's own writing mode.
659
658
@@ -678,27 +677,27 @@ with each of the two keywords specifying one of them:
678
677
</dl>
679
678
680
679
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.
683
682
If the other keyword is unambiguous about its axis,
684
683
then the ambiguous keyword is referring to the opposite axis.
685
684
(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.)
687
686
If both keywords are ambiguous, however,
688
687
then the first refers to the block axis of the element's [=containing block=] ,
689
688
and the second to the inline axis.
690
689
(For example, ''span-all start'' is equivalent to ''span-all inline-start'' .)
691
690
692
691
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''
694
693
if the given keyword is unambigous about its axis;
695
694
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'' .)
698
697
699
698
<hr>
700
699
701
- The <<inset -area>> also implies a default [=self-alignment=] ,
700
+ The <<position -area>> also implies a default [=self-alignment=] ,
702
701
which will be used if the [=self-alignment property=] on the element
703
702
is ''align-self/normal'' :
704
703
@@ -721,16 +720,16 @@ is ''align-self/normal'':
721
720
(making the element's end side flush with the end side of the "start+center" region).
722
721
723
722
<figure>
724
- <img src="images/inset -area-example.png" width=400>
723
+ <img src="images/position -area-example.png" width=400>
725
724
<figcaption>
726
- An example of ''inset -area: span-x-start top'' positioning.
725
+ An example of ''position -area: span-x-start top'' positioning.
727
726
</figcaption>
728
727
</figure>
729
728
</div>
730
729
731
730
Note: When the [=default anchor element=]
732
731
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.
734
733
735
734
736
735
<!-- Big Text: anchor()
@@ -959,7 +958,7 @@ or does not have a [=default anchor element=],
959
958
this value behaves as ''<self-position>/center''
960
959
and has no additional effect on how [=inset properties=] resolve.
961
960
962
- Note: Similar to 'inset -area' ,
961
+ Note: Similar to 'position -area' ,
963
962
when using ''anchor-center'' ,
964
963
if the anchor is too close to the edge of the element's
965
964
[=original containing block=] ,
@@ -1387,7 +1386,7 @@ Giving Fallback Options: the 'position-try-fallbacks' property {#position-try-fa
1387
1386
1388
1387
<pre class=propdef>
1389
1388
Name : position-try-fallbacks
1390
- Value : none | [ [<<dashed-ident>> || <<try-tactic>>] | <<'inset -area'>> ]#
1389
+ Value : none | [ [<<dashed-ident>> || <<try-tactic>>] | <<'position -area'>> ]#
1391
1390
Initial : none
1392
1391
Inherited : no
1393
1392
Applies to : [=absolutely-positioned=] elements
@@ -1473,10 +1472,10 @@ Values have the following meanings:
1473
1472
1474
1473
Otherwise, does nothing.
1475
1474
1476
- : <dfn><<'inset -area'>></dfn>
1475
+ : <dfn><<'position -area'>></dfn>
1477
1476
::
1478
1477
Automatically creates a [=position option=]
1479
- composed solely of an 'inset -area' property
1478
+ composed solely of an 'position -area' property
1480
1479
with the given value.
1481
1480
</dl>
1482
1481
@@ -1572,16 +1571,16 @@ Values have the following meanings:
1572
1571
as it's a <<baseline-position>>
1573
1572
rather than a <<self-position>> .
1574
1573
</div>
1575
- * For 'inset -area' ,
1574
+ * For 'position -area' ,
1576
1575
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=]
1578
1577
maintain the same relative relationship to the new direction
1579
1578
that they had to the old.
1580
1579
1581
1580
<div class=example>
1582
1581
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'' .
1585
1584
</div>
1586
1585
1587
1586
5. Return |styles|.
@@ -1791,7 +1790,7 @@ the following [=properties=]:
1791
1790
* [=sizing properties=]
1792
1791
* [=self-alignment properties=]
1793
1792
* 'position-anchor'
1794
- * 'inset -area'
1793
+ * 'position -area'
1795
1794
1796
1795
It is invalid to use ''!important'' on the properties in the <<declaration-list>> .
1797
1796
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=].
1896
1895
with any non-''top/auto'' [=inset property|inset=] values
1897
1896
shifted by the [=snapshotted scroll offset=] .
1898
1897
1899
- If |el| has a non-''inset -area/none'' 'inset -area' value,
1898
+ If |el| has a non-''position -area/none'' 'position -area' value,
1900
1899
then for the purpose of the preceding calculation,
1901
1900
shift the value of ''anchor(start)'' and ''anchor(end)''
1902
- in the [=inset -area grid=]
1901
+ in the [=position -area grid=]
1903
1902
by the [=snapshotted scroll offset=] as well.
1904
1903
1905
1904
Note: In other words, ''top: anchor(bottom); bottom: auto;''
1906
- and ''inset -area: bottom;''
1905
+ and ''position -area: bottom;''
1907
1906
should result in the same IMCB
1908
1907
for the purpose of these overflow calculations.
1909
1908
@@ -2259,8 +2258,8 @@ interface CSSPositionTryDescriptors : CSSStyleDeclaration {
2259
2258
attribute CSSOMString justify-self;
2260
2259
attribute CSSOMString positionAnchor;
2261
2260
attribute CSSOMString position-anchor;
2262
- attribute CSSOMString insetArea ;
2263
- attribute CSSOMString inset -area;
2261
+ attribute CSSOMString positionArea ;
2262
+ attribute CSSOMString position -area;
2264
2263
};
2265
2264
</xmp>
2266
2265
0 commit comments