@@ -75,8 +75,11 @@ urlPrefix: https://drafts.csswg.org/css-sizing/#; type: dfn
75
75
text: intrinsic sizes
76
76
urlPrefix: https://drafts.csswg.org/css-break/#; type: dfn
77
77
text: fragmentation break
78
- urlPrefix: https://www.w3.org/TR/CSS21/box.html#; type: dfn
79
- url: box-dimensions; text: box model edges
78
+ urlPrefix: https://www.w3.org/TR/CSS21/; type:dfn
79
+ urlPrefix: box.html#;
80
+ url: box-dimensions; text: box model edges
81
+ urlPrefix: visudet.html#;
82
+ text: static position
80
83
urlPrefix: https://html.spec.whatwg.org/#; type: dfn
81
84
text: structuredserializeforstorage
82
85
text: structureddeserialize
@@ -791,9 +794,60 @@ This section describes how other CSS modules interact with the CSS Layout API.
791
794
Sizing {#interaction-sizing}
792
795
----------------------------
793
796
797
+
798
+
794
799
Positioning {#interaction-positioning}
795
800
--------------------------------------
796
801
802
+ All positioning in this level of the specification is handled by the user agent.
803
+
804
+ As a result:
805
+ - Out-of-flow children do not appear as {{LayoutChild}} ren.
806
+
807
+ - <a>Layout API containers</a> establish <a>containing blocks</a> <a
808
+ href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details"> exactly like block
809
+ containers do</a> . [[!CSS21]]
810
+
811
+ - The {{Fragment/inlineOffset}} and {{Fragment/blockOffset}} represent the position of the
812
+ fragment before any positioning and transforms have occured.
813
+
814
+ - The <a>static position</a> of an absolutely-positioned child of a <a>layout API container</a> is
815
+ set to the <a>inline-start</a> , <a>block-start</a> padding edge of the <a>layout API
816
+ container</a> . Auto margins are treated as zero for the child.
817
+
818
+ <div class="note">
819
+ Note: In the example below:
820
+ - "child-relative" would be the only child passed to the author's layout. If it was positioned
821
+ at ({{Fragment/inlineOffset}} <code> = 20</code> , {{Fragment/blockOffset}} <code> =
822
+ 30</code> ), its final position would be (<code> 25</code> , <code> 40</code> ) as the relative
823
+ positioning was handled by the user agent.
824
+
825
+ - "child-absolute" would not appear as a {{LayoutChild}} , and instead would be laid out and
826
+ positioned by the user agent.
827
+
828
+ - The examples above also apply in a similar way to sticky and fixed positioned children.
829
+
830
+ <pre class="lang-html">
831
+ <style>
832
+ #container {
833
+ display: layout(foo);
834
+ position: relative; /* container is a containing block */
835
+ width: 100px;
836
+ height: 100px;
837
+ }
838
+ #child-relative {
839
+ position: relative;
840
+ left: 5px;
841
+ top: 10px;
842
+ }
843
+ </style>
844
+ <div id="container">
845
+ <div id="child-relative"></div>
846
+ <div id="child-absolute"></div>
847
+ </div>
848
+ </pre>
849
+ </div>
850
+
797
851
Overflow {#interaction-overflow}
798
852
--------------------------------
799
853
0 commit comments