mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Parse the position-anchor property
This commit is contained in:
committed by
Sam Atkins
parent
7374a07fbc
commit
27cdf3a2c8
Notes:
github-actions[bot]
2025-10-07 10:31:57 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/27cdf3a2c8e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6363 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Tests basics of the 'position-anchor' property</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#propdef-position-anchor">
|
||||
<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>
|
||||
Reference in New Issue
Block a user