Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit f03cd4a

Browse files
andruudlutien
authored andcommitted
Bug 1967972 [wpt PR 52725] - [ident] Resolve ident() in registered custom properties,
Automatic update from web-platform-tests [ident] Resolve ident() in registered custom properties Additionally, add a basic crash test for @Property while we wait for Issue 12219 to resolve. w3c/csswg-drafts#12219 Bug: 384930424 Change-Id: I36c215cac8558dbc964fda366e2ddba3c7b2017a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6578154 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1464032} -- wpt-commits: 85eadd1d77986f1687cf2310c3201ee5f37c1f3a wpt-pr: 52725 Differential Revision: https://phabricator.services.mozilla.com/D251001
1 parent 5e0c5e0 commit f03cd4a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<title>CSS Properties Values API: Registered custom properties with ident()</title>
3+
<link rel="help" href="https://drafts.csswg.org/css-values-5/#ident">
4+
<link rel="help" href="https://drafts.csswg.org/css-properties-values-api-1">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<style>
8+
@property --ident {
9+
syntax: "<custom-ident>";
10+
inherits: true;
11+
initial-value: none;
12+
}
13+
</style>
14+
<div id=target></div>
15+
<script>
16+
let actual_ident = 'ident("--myident" calc(42 * sign(1em - 1px)))';
17+
let expected_ident = '--myident42';
18+
19+
test((t) => {
20+
t.add_cleanup(() => { target.style = ''; })
21+
target.style.setProperty('--ident', actual_ident);
22+
assert_equals(getComputedStyle(target).getPropertyValue('--ident'),
23+
expected_ident);
24+
}, 'The ident() function is resolved in a registered custom property');
25+
</script>

0 commit comments

Comments
 (0)