forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-anchor-position] Move cascade tests to wpt Bug: 40281995 Change-Id: I2005af13e704cdcdc2e16d22d6145e1a784eca0b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5377334 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1274118} -- wpt-commits: 83a61a2b183e18ad4ab3e8285518e0a69f8e0def wpt-pr: 45168
39 lines
1 KiB
HTML
39 lines
1 KiB
HTML
<!DOCTYPE html>
|
|
<title>CSS Anchor Positioning Test: Initial @position-try does not trigger a transition</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-apply">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<div id=cb>
|
|
<div id=abs></div>
|
|
</div>
|
|
<style>
|
|
#cb {
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
background: lightpink;
|
|
}
|
|
#abs {
|
|
position: absolute;
|
|
background: darkcyan;
|
|
top: 10px;
|
|
left: 10px;
|
|
width: 150px; /* force fallback */
|
|
height: 25px;
|
|
position-try-options: --pf;
|
|
transition-property: top, left;
|
|
transition-duration: 10s;
|
|
transition-timing-function: steps(2, start);
|
|
}
|
|
@position-try --pf {
|
|
width: 50px;
|
|
top: 50px;
|
|
left: 50px;
|
|
}
|
|
</style>
|
|
<script>
|
|
test(() => {
|
|
assert_equals(getComputedStyle(abs).top, '50px');
|
|
assert_equals(getComputedStyle(abs).left, '50px');
|
|
}, 'No transition for initial style with @position-try');
|
|
</script>
|