Skip to content

Commit

Permalink
Bug 1888597 [wpt PR 45424] - [css-anchor-position] Simple implementat…
Browse files Browse the repository at this point in the history
…ion for position-visibility: anchors-valid, a=testonly

Automatic update from web-platform-tests
[css-anchor-position] Simple implementation for position-visibility: anchors-valid

Due to the complexity to implement the original proposal of
position-visibility: anchors-valid and anchors-visible in
w3c/csswg-drafts#7758 (comment),
we have proposed a simple implementation
w3c/csswg-drafts#7758 (comment)
and this implementation is based on the simple proposal.

Bug: 329703412
Change-Id: I7ac5d9bfbd5a3c89822567ffa6701cc66959b665
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5406199
Reviewed-by: Philip Rogers <[email protected]>
Commit-Queue: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1280441}

--

wpt-commits: f401f6100e5dcf03da047fd6164fa5132064ef13
wpt-pr: 45424
  • Loading branch information
wangxianzhu authored and moz-wptsync-bot committed Apr 10, 2024
1 parent c0cc34b commit 5f077dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
width: 100px;
height: 100px;
background: orange;
display: inline-block;
}
.target {
width: 100px;
height: 100px;
background: green;
}
</style>

<div class="anchor">anchor1</div>

<div class="anchor">anchor2</div>

<div class="anchor">anchor3</div>
<div class="target">target1</div>
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
}
</style>

<!-- #target1 should not be visible because anchor name does not exist. -->
<!-- #target1 should be visible. -->
<div class="anchor" style="anchor-name: --a1;">anchor1</div>
<div id="target1" class="target" style="position-anchor: --does-not-exist;">target1</div>
<div id="target1" class="target" style="position-anchor: --a1; background: green">target1</div>

<!-- #target2 should not be visible because referenced name in anchor() does not exist. -->
<div class="anchor" style="anchor-name: --a2;">anchor2</div>
<div id="target2" class="target" style="position-anchor: --a2; top: anchor(--does-not-exist bottom);">target2</div>

<!-- #target3 should not be visible because referenced name in anchor-size() does not exist. -->
<div class="anchor" style="anchor-name: --a3;">anchor3</div>
<div id="target3" class="target" style="position-anchor: --a3; min-width: anchor-width(--does-not-exist width);">target3</div>
<!-- #target2 should not be visible because anchor name does not exist. -->
<div id="target2" class="target" style="top: anchor(--does-not-exist bottom);">target2</div>

0 comments on commit 5f077dc

Please sign in to comment.