Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Tests basics of the 'position-anchor' property</title>
<link rel="author" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<div id="container">
<div id="target"></div>
</div>
<script>
// position-anchor: <anchor-element>
// <anchor-element> = auto | <dashed-ident>
test_valid_value('position-anchor', 'auto');
test_valid_value('position-anchor', '--foo');
test_invalid_value('position-anchor', 'none');
test_invalid_value('position-anchor', 'foo-bar');
test_invalid_value('position-anchor', '--foo --bar')
test_invalid_value('position-anchor', '--foo, --bar')
test_invalid_value('position-anchor', '100px');
test_invalid_value('position-anchor', '100%');
// Computed value: as specified
test_computed_value('position-anchor', 'auto');
test_computed_value('position-anchor', '--foo');
// Initial: auto
// Inherited: no
assert_not_inherited('position-anchor', 'auto', '--foo');
// Animation type: discrete
test_no_interpolation({
property: 'position-anchor',
from: '--foo',
to: 'auto',
});
</script>