Files
sousa-gecko/testing/web-platform/tests/css/css-values/calc-mix-invalid.tentative.html
T
Sam Weinig 50220b6891 Bug 2035839 [wpt PR 59515] - Adds tests for CSS Values 5 calc-mix(), a=testonly
Automatic update from web-platform-tests
Adds tests for CSS Values 5 calc-mix() (#59515)
--

wpt-commits: aac6afee9284db93fd006a74b2aedb103e0e33c7
wpt-pr: 59515
2026-06-02 10:26:31 +00:00

42 lines
1.4 KiB
HTML

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-mix">
<link rel="author" title="sam@webkit.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_invalid_number(value) {
test_invalid_value('scale', value);
}
function test_invalid_length_percentage(value) {
test_invalid_value('text-indent', value);
}
function test_invalid_length(value) {
test_invalid_value('transform-origin-z', value);
}
// Syntax checking
test_invalid_number('calc-mix()');
test_invalid_number('calc-mix( )');
test_invalid_number('calc-mix(,)');
test_invalid_number('calc-mix(1, )');
test_invalid_number('calc-mix(0,1,)');
test_invalid_number('calc-mix(0,, 0)');
test_invalid_number('calc-mix(1 50, 3)');
test_invalid_number('calc-mix(1 150%, 3)');
test_invalid_number('calc-mix(1 -50%, 3)');
// Type checking
test_invalid_number('calc-mix(1px 50%, 3px 50%)');
test_invalid_number('calc-mix(1deg 50%, 3turn 50%)');
test_invalid_number('calc-mix(1% 50%, 3 50%)');
test_invalid_length('calc-mix(1 50%, 3 50%)');
test_invalid_length('calc-mix(1deg 50%, 3turn 50%)');
test_invalid_length('calc-mix(1% 50%, 3 50%)');
test_invalid_length_percentage('calc-mix(1 50%, 3 50%)');
test_invalid_length_percentage('calc-mix(1deg 50%, 3turn 50%)');
test_invalid_length_percentage('calc-mix(1% 50%, 3 50%)');
</script>