mirror of
https://github.com/servo/servo.git
synced 2025-06-30 03:53:37 +01:00
29 lines
1.2 KiB
HTML
29 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
|
|
<link rel="help" href="https://drafts.csswg.org/css-values-4/#numbers">
|
|
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
|
|
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../support/parsing-testcommon.js"></script>
|
|
<script>
|
|
function test_valid_number(value, expected) {
|
|
test_valid_value('opacity', value, expected);
|
|
}
|
|
|
|
test_valid_number('min(1)', 'min(1)');
|
|
test_valid_number('max(1)', 'max(1)');
|
|
|
|
test_valid_number('min(1, 2, 3)', 'min(1, 2, 3)');
|
|
test_valid_number('min(3, 2, 1)', 'min(3, 2, 1)');
|
|
test_valid_number('max(1, 2, 3)', 'max(1, 2, 3)');
|
|
test_valid_number('max(3, 2, 1)', 'max(3, 2, 1)');
|
|
|
|
test_valid_number('calc(min(1) + min(2))', 'calc(min(1) + min(2))');
|
|
test_valid_number('calc(max(1) + max(2))', 'calc(max(1) + max(2))');
|
|
test_valid_number('calc(1 + min(1))', 'calc(1 + min(1))');
|
|
test_valid_number('calc(min(1) + 1)', 'calc(1 + min(1))');
|
|
test_valid_number('calc(1 + max(1))', 'calc(1 + max(1))');
|
|
test_valid_number('calc(max(1) + 1)', 'calc(1 + max(1))');
|
|
|
|
</script>
|