3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/publicdomain/zero/1.0/
8 <title>CSS Grid Reference: abs pos static position (ancestor of grid container as abs.pos. CB)
</title>
9 <link rel=
"author" title=
"Mats Palmgren" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1151243">
10 <style type=
"text/css">
12 color:black
; background-color:white
; font-size:16px; padding:0; margin:0;
14 separator
{ clear:both
; display:block
; height:6px; }
19 padding: 1px 3px 5px 7px;
20 grid-template: 25px 33px 7px / 30px 51px 5px;
28 padding: 3px 5px 7px 9px;
30 border-width: 1px 3px 5px 7px;
31 border-block-start-color: blue
;
32 border-inline-start-color: lime
;
33 writing-mode: vertical-lr
; direction:rtl
;
38 grid-area: 2 / 2 / 3 / 3;
41 abs1
{ width:20px; height:97px; top:-12px; left:-30px; background:lime
; }
42 abs3
{ top: -20px; left:-35px; right:-18px; background:cyan
; }
43 abs4
{ width:20px; top:-6px; bottom:-53px; background:silver
; }
44 abs1::before
{ content:"1";}
45 abs3::before
{ content:"3";}
46 abs4::before
{ content:"4";}
48 .hl { writing-mode: horizontal-tb
; direction:ltr
; }
49 .hr { writing-mode: horizontal-tb
; direction:rtl
; }
50 .vl { writing-mode: vertical-lr
; }
51 .vr { writing-mode: vertical-rl
; }
52 .vlr { writing-mode: vertical-lr
; direction:rtl
; }
53 .vrl { writing-mode: vertical-rl
; direction:ltr
; }
55 .hr abs3 { left:-16px; right:-37px; }
56 .vl abs3, .vr abs3, .vrl abs3, .vlr abs3 { left:-30px; top:-14px; right:-41px; }
57 .vr abs3, .vrl abs3 { left:-39px; right:-32px; }
58 .vrl abs3 { top:-25px; }
60 .hr abs1 { left: 61px; }
61 .vl abs1, .vr abs1, .vrl abs1, .vlr abs1 { top:-6px; left:-25px; }
62 .vr abs1, .vrl abs1 { left:38px; }
63 .vrl abs1 { top:-17px; }
65 .hl abs4 { left:51px; }
66 .hr abs4 { left:-20px; }
67 .vl abs4, .vr abs4, .vrl abs4, .vlr abs4 { top:0px; bottom:-41px; left:-25px; }
68 .vr abs4, .vrl abs4 { left:38px; }
69 .vrl abs4 { top:-11px; bottom:-30px; }
76 document
.body
.style
.display
="none";
77 var wm
= [ "hl", "hr", "vl", "vr", "vlr", "vrl" ];
78 for (var i
= 0; i
< wm
.length
; ++i
) {
79 for (var j
= 0; j
< wm
.length
; ++j
) {
80 var div
= document
.createElement("div");
81 div
.className
= "grid " + wm
[i
];
83 div
.appendChild(span
= document
.createElement("span"));
84 span
.appendChild(document
.createTextNode("A"));
85 div
.appendChild(document
.createElement("abs1"));
86 div
.appendChild(span
= document
.createElement("span"));
87 span
.appendChild(document
.createTextNode("BC"));
89 div
.appendChild(document
.createElement("abs3"));
90 div
.appendChild(document
.createElement("abs4"));
91 var wrap
= document
.createElement("div");
92 wrap
.className
= "wrap ";
93 wrap
.appendChild(div
);
94 document
.body
.appendChild(wrap
)
96 document
.body
.appendChild(document
.createElement("separator"));
98 document
.body
.style
.display
="";