Files
sousa-gecko/testing/web-platform/tests/css/css-mixins/functions/dashed-function-named-arg.tentative.html
T
Kevin Babbitt 5b6106a6ae Bug 2053663 [wpt PR 61166] - [css-mixins] Split tests into subdirectories for functions and mixins, a=testonly
Automatic update from web-platform-tests
[css-mixins] Split tests into subdirectories for functions and mixins

No changes to the test files other than updating relative paths.
WEB_FEATURES.yml files were updated to match all files in respective
subdirectories.

Bug: 406935599
Change-Id: I864e1ad0bb36a5945fd9945365933b3697d3f764
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8061706
Reviewed-by: Alison Maher <almaher@microsoft.com>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1659001}

--

wpt-commits: 5f6046734ece0649fa6f3ad2915ea23ba4d3674a
wpt-pr: 61166
2026-07-12 11:57:58 +00:00

35 lines
1.5 KiB
HTML

<!DOCTYPE html>
<title>Custom Functions: &lt;dashed-function&gt; with named argument syntax</title>
<link rel="help" href="https://drafts.csswg.org/css-mixins-1/#function-rule">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11749">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
test_valid_value('top', '--func(myident)');
test_valid_value('top', '--func(--myident)');
test_valid_value('top', '--func(--)');
test_valid_value('top', '--func(50px --myident:)');
// Arguments may not begin within <dashed-ident> <colon> (ignoring whitespace);
// this pattern is reserved for named arguments in the future.
//
// https://github.com/w3c/csswg-drafts/issues/11749
//
// Note: This matches the "bad declaration" handling in
// https://drafts.csswg.org/css-syntax/#consume-qualified-rule
test_invalid_value('top', '--func(--myident:)');
test_invalid_value('top', '--func( --myident:)');
test_invalid_value('top', '--func(--myident :)');
test_invalid_value('top', '--func(--myident: )');
test_invalid_value('top', '--func( --myident : )');
test_invalid_value('top', '--func(10px, --myident : )');
// It's valid when wrapped in {}, though:
test_valid_value('top', '--func({--myident:})');
test_valid_value('top', '--func({ --myident:})');
test_valid_value('top', '--func({--myident :})');
test_valid_value('top', '--func({--myident: })');
test_valid_value('top', '--func(10px, { --myident : })');
</script>