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

Commit 1c603b4

Browse files
andruudlutien
authored andcommitted
Bug 1967789 [wpt PR 52700] - [ident] Support ident() in container/container-name,
Automatic update from web-platform-tests [ident] Support ident() in container/container-name This CL adds support for ident() in the container and container-name properties. Since the behavior within at-rule preludes is not specified [1], this CL just includes a basic crash test for "@container ident(...)" as a provisional safeguard. [1] w3c/csswg-drafts#12219 Bug: 384930424 Change-Id: I200e8f1c516ebe69e48f97048014c3f65beac349 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6574640 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1463950} -- wpt-commits: 742db34711329e93cc54d6b8b1a3b7eedbe41e65 wpt-pr: 52700 Differential Revision: https://phabricator.services.mozilla.com/D250989
1 parent 69e5735 commit 1c603b4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<title>CSS Conditional: The ident() function in @container/container-name</title>
3+
<link rel="help" href="https://drafts.csswg.org/css-values-5/#ident">
4+
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-rule">
5+
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-name">
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-conditional-5/#container-name
15+
test_computed_value('container-name', actual_ident, expected_ident);
16+
test_computed_value('container-name', `--c ${actual_ident}`,
17+
`--c ${expected_ident}`);
18+
19+
// https://drafts.csswg.org/css-conditional-5/#container-shorthand
20+
test_computed_value('container', actual_ident, expected_ident);
21+
test_computed_value('container', `--c ${actual_ident} / size`,
22+
`--c ${expected_ident} / size`);
23+
24+
</script>

0 commit comments

Comments
 (0)