Skip to content

Commit c29b035

Browse files
fantasaifoolip
authored andcommitted
[css-anchor-position-1] Better use of colors to make the test results visible and understandable
1 parent 6ea9847 commit c29b035

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

css/css-anchor-position/anchor-position-multicol-002.html

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
}
2525
.spacer {
2626
height: 10px;
27-
background: pink;
27+
background: silver;
2828
}
2929
.anchor1 {
3030
anchor-name: --a1;
3131
margin-left: 10px;
3232
width: 50px;
3333
height: 90px;
34-
background: blue;
34+
background: yellow;
3535
}
3636
.target {
3737
position: absolute;
@@ -44,26 +44,37 @@
4444
top: anchor(--a1 top);
4545
width: anchor-size(--a1 width);
4646
height: anchor-size(--a1 height);
47-
background: lime;
48-
opacity: .3;
47+
border: dashed 4px aqua;
48+
opacity: .2;
49+
box-sizing: border-box;
4950
}
5051
.target1-rb {
5152
right: anchor(--a1 right);
5253
bottom: anchor(--a1 bottom);
5354
width: 10px;
5455
height: 10px;
56+
background: teal;
57+
}
58+
59+
.inner .target1 {
60+
border-color: fuchsia;
61+
border-style: solid;
62+
}
63+
.inner .target1-rb {
5564
background: purple;
5665
}
66+
5767
</style>
5868
<body onload="checkLayoutForAnchorPos('.target')">
59-
<p>The green box should be a union of blue boxes,
60-
and the purple box should be at the right-bottom of the green box.
61-
</p>
69+
<p>The dashed aqua rectangle should encompass both yellow fragments,
70+
and the teal box should be at the bottom-right of the aqua box.
71+
<p>The fuchsia rectangle should match the edge of the yellow box except where it's split across columns,
72+
and the purple box should be at the bottom-right of the fuchsia rectangle.
6273
<div class="spacer" style="height: 10px"></div>
63-
<div class="cb">
74+
<div class="cb outer">
6475
<div class="columns">
6576
<div class="spacer" style="height: 30px"></div>
66-
<div class="cb">
77+
<div class="cb inner">
6778
<!-- This spacer fills up to the middle of the 2nd column. -->
6879
<div class="spacer" style="height: 130px"></div>
6980
<div class="anchor1"></div>

0 commit comments

Comments
 (0)