Skip to content

Commit bad22aa

Browse files
andruudlutien
authored andcommitted
Bug 1967940 [wpt PR 52719] - [ident] Test ident() for @position-try/position-try,
Automatic update from web-platform-tests [ident] Test ident() for @position-try/position-try Since the behavior within at-rule preludes is not specified [1], this CL just includes a basic crash test for "@position-try ident(...)" as a provisional safeguard. [1] w3c/csswg-drafts#12219 Bug: 384930424 Change-Id: If0b7adf6ce68f32d22529f76bc29ab88c72a9aed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6573937 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1463976} -- wpt-commits: ef521b4f5b6ade5f8315cfdee1f5d289d8a7b4ee wpt-pr: 52719 Differential Revision: https://phabricator.services.mozilla.com/D250991
1 parent a4625f5 commit bad22aa

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<title>CSS Anchor Positioning: The ident() function in @position-try/position-try</title>
3+
<link rel="help" href="https://drafts.csswg.org/css-values-5/#ident">
4+
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-rule">
5+
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks">
6+
<script src="/resources/testharness.js"></script>
7+
<script src="/resources/testharnessreport.js"></script>
8+
<script src="/css/support/computed-testcommon.js"></script>
9+
<div id=target></div>
10+
<script>
11+
let actual_ident = 'ident("--myident" calc(42 * sign(1em - 1px)))';
12+
let expected_ident = '--myident42';
13+
14+
// https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks
15+
test_computed_value('position-try-fallbacks', actual_ident, expected_ident);
16+
test_computed_value('position-try-fallbacks', `flip-block, ${actual_ident}`,
17+
`flip-block, ${expected_ident}`);
18+
19+
// https://drafts.csswg.org/css-anchor-position-1/#position-try-prop
20+
test_computed_value('position-try', actual_ident, expected_ident);
21+
test_computed_value('position-try', `most-width ${actual_ident}`,
22+
`most-width ${expected_ident}`);
23+
</script>

0 commit comments

Comments
 (0)